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

Indexer tasks trample each other #6

Open
nhynes opened this issue Jan 6, 2024 · 0 comments
Open

Indexer tasks trample each other #6

nhynes opened this issue Jan 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nhynes
Copy link
Contributor

nhynes commented Jan 6, 2024

Currently it's possible for stale data coming from the large, slow batch-update task to arrive after data from the fast per-block task and overwrite the committed fresh data. So a trout race in some sense, but not the kind we want.

There are two reasonable fixes:

  1. Each indexer task needs to be pinned to a particular block and the database needs to store the more recent block so that updates are idempotent. This is the more complicated, general solution.
  2. Don't have the batch update task re-index the per-block task's data because it's wasteful anyway. This is a simpler solution that will split the code into additional paths.
@nhynes nhynes added the bug Something isn't working label Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant