Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loki returns an entire table on query with negative limit value. #1604

Closed
Estrax opened this issue Jan 29, 2020 · 3 comments
Closed

Loki returns an entire table on query with negative limit value. #1604

Estrax opened this issue Jan 29, 2020 · 3 comments
Labels
component/loki keepalive An issue or PR that will be kept alive and never marked as stale. type/bug Somehing is not working as expected

Comments

@Estrax
Copy link

Estrax commented Jan 29, 2020

Describe the bug
When querying Loki with a query parameter limit: -1 (or any other negative value), Loki returns an entire table. When doing it from Grafana, it crashes a browser thread when the returned object is too big (because parsing takes too long or we exceed a memory limit).

Expected behavior
With negative limit parameter Loki returns no elements.

@adityacs
Copy link
Contributor

adityacs commented Feb 17, 2020

@cyriltovena This is already fixed here #1470
@Estrax Which version of loki you are using?

Example

curl 'http://localhost:3100/loki/api/v1/query_range?direction=BACKWARD&end=1581911056457208000&limit=-1&query=%7Bfilename%3D%22%2Fvar%2Flog%2Fsystem.log%22%7D&start=1581695056457208000'
rpc error: code = Code(400) desc = limit must be a positive value

@Estrax
Copy link
Author

Estrax commented Feb 17, 2020

@adityacs always the current master :) this particular thing was noticed in 1.3.0. We already took care of that on a Grafana side, I just pointed it out that it might be worth checking on a Loki side again.

@adityacs
Copy link
Contributor

adityacs commented Mar 9, 2020

@Estrax Sorry for the delayed reply. I tested this on 6.6.0 Grafana with 1.3.0 Loki. It returns the expected error

Screenshot 2020-03-09 at 4 14 19 PM

@Estrax Estrax closed this as completed Mar 18, 2020
@chaudum chaudum added the type/bug Somehing is not working as expected label Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/loki keepalive An issue or PR that will be kept alive and never marked as stale. type/bug Somehing is not working as expected
Projects
None yet
Development

No branches or pull requests

3 participants