This repository has been archived by the owner on Oct 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
enhancement: don't allow missing blocks #1349
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: rashad <[email protected]>
Co-authored-by: rashad <[email protected]>
Co-authored-by: rashad <[email protected]>
lostman
force-pushed
the
maciej/1150-no-missing-blocks
branch
from
September 13, 2023 13:41
6397703
to
4faa027
Compare
lostman
force-pushed
the
maciej/1150-no-missing-blocks
branch
from
September 15, 2023 15:48
fff1861
to
61f4850
Compare
ra0x3
suggested changes
Sep 18, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Looks mostly OK
- Left some small pieces of feedback
ra0x3
approved these changes
Sep 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK ✅
- Will defer to @deekerno
deekerno
approved these changes
Sep 21, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Closes #1150.
This branch is built on top of #1337 and will be merged after.
Testing steps
We don't have any means to check the indexer's status—whether it is running or terminated with an error code, etc.
The database trigger can be observed in manual testing by adding something like this to
executor.rs
:Then, running the indexer:
Should produce:
CI testing
I have added a test case that simulates missing a block by deleting a row from
indexmetadataentity
. The expected output is:Since missing blocks are not recoverable in the executor loop, it terminates without retries.
Changelog
indexmetadataentity
table that ensures indexed blocks must be consecutive.MissingBlocks
error code for WASM indexers returned when the database operation fails due to the exception raised by the trigger.get_start_block
to returnlast + 1
instead oflast
to avoid processing the same block twice (and thus triggering an exception).last_block_height_for_an_indexer
now returns0
if the indexer processed no blocks.