orchestracities/ngsi-timeseries-api

DEFAULT_LIMIT is not working

tonyrosset opened this issue · 11 comments

DEFAULT_LIMIT when set to a value more than 10000, it has noeffect it directs back to 10000

environment:
- CRATE_HOST=crate
- REDIS_HOST=redis
- REDIS_PORT=${REDIS_PORT}
- LOGLEVEL=ERROR
- DEFAULT_LIMIT=1000000

@tonyrosset thanks for reporting this, we'll look into it...

@tonyrosset are you using the limit and last_n params in the API call? If not, it could be there's a problem with CrateDB. I'm just looking at the code that figures out what the SQL limit actual value should be:

What's the API call you make to retrieve results?

thanks,
I am not using the limit or lastN. By default, when I set no DEFAULT_LIMIT I get 10,000 rows in the API call. When I set it to 100, I get 100 rows as supposed to be. The problem is only when I try to set the limit more than 10,000.

http://localhost:8668/v2/types/hwsensors?attrs=airTemperature&fromDate=2024-05-01T13:00:00&toDate=2024-06-12T09:00:00

@tonyrosset, @pooja1pathak has just landed #765 which should fix the issue.

@pooja1pathak thanks,
@c0c0n3 Once u have accepted the commit at your repo I can use it, right?

Once u have accepted the commit at your repo I can use it

if you only need to link the code, then the fix will be available as soon as I merge #765 into the main branch. But I guess you'd like to download a Docker image with the fix? We have a GitHub action to automatically build and push Docker images to DockerHub when a PR gets merged into main:

but unfortunately it's broken at the moment---I think it's just a silly thing w/ credentials having expired. Anyhoo, you can still build your own Docker image using the Docker file in the repo's root dir:

there's also a build script:

Hope that helps!

thanks, that helps,
also, it would be great if you let me know when the docker image is updated.
Thanks once again.

sure no prob!

it would be great if you let me know when the docker image is updated.

If you subscribe to repo notifications, GitHub will send you an email every time we merge a PR...