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

Unexpected Limit behavior #1090

Open
barnjamin opened this issue Jul 4, 2022 · 1 comment
Open

Unexpected Limit behavior #1090

barnjamin opened this issue Jul 4, 2022 · 1 comment
Labels
new-bug Bug report that needs triage Team Lamprey

Comments

@barnjamin
Copy link
Contributor

barnjamin commented Jul 4, 2022

Subject of the issue

Reported in Discord

Currently the following produces somewhat surprising results

https://testnet-idx.algonode.cloud/v2/applications/83648221/logs?limit=500
https://testnet-idx.algonode.cloud/v2/applications/83648221/logs?limit=1

Where limit 1 returns no results.

I believe this is because the transaction search applies the limit and the filter here:

https://github.com/algorand/indexer/blob/develop/api/handlers.go#L542-L550

further limits the result set, so the limit is how many rows to retrieve in the db rather than the actual limit of log values to get back.

Acceptance Criteria

  • The root cause of this is likely the way we handle client side filtering, and is not limited to just the logs.
  • Design a solution, and/or update documentation to reflect the expected behavior.
    • we could document that you should continue paging.
    • we could automatically run multiple queries.
    • we could avoid client side filtering.
@barnjamin barnjamin added the new-bug Bug report that needs triage label Jul 4, 2022
@liamvuverdex
Copy link

Thank you for submitting this for me, @barnjamin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-bug Bug report that needs triage Team Lamprey
Projects
None yet
Development

No branches or pull requests

3 participants