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

bugfix: reorder paginated queries #348

Merged
merged 2 commits into from
Mar 7, 2023
Merged

Conversation

Andrew7234
Copy link
Collaborator

@Andrew7234 Andrew7234 commented Mar 7, 2023

Potential fix to the deadlocks encountered on staging.

Tested by running multiple batches of 50 queries in parallel to localhost:8008/v1/emerald/transactions?limit=3

Edit*: Hrm I can't break my local indexer(without the bugfix) with 50 parallel queries either

Copy link
Collaborator

@pro-wh pro-wh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good, this also prevents us from leaking rows if the count query errors

Copy link
Contributor

@mitjat mitjat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find! I'll be curious what the results are. Either way it's probably good hygiene to merge in this change 👍

Edit: I tested in staging, and after this fix, server reliably takes 150 parallel queries. 🎉

storage/client/client.go Outdated Show resolved Hide resolved
storage/client/client.go Outdated Show resolved Hide resolved
@Andrew7234 Andrew7234 self-assigned this Mar 7, 2023
@Andrew7234 Andrew7234 merged commit 82b28da into main Mar 7, 2023
@Andrew7234 Andrew7234 deleted the andrew7234/bugfix-pagination branch March 7, 2023 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants