-
Notifications
You must be signed in to change notification settings - Fork 5
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
(tx_indexer) Improvement to restore transactions in process from database to memcache #129
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
kobayurii
force-pushed
the
tx_ind_without_db_cache
branch
3 times, most recently
from
October 24, 2023 14:19
5c9121b
to
e5fecf4
Compare
kobayurii
changed the title
switch tx indexer to cache without database
(tx_indexer) Improvement to restore transactions in process from database to memcache
Oct 25, 2023
khorolets
reviewed
Oct 26, 2023
kobayurii
force-pushed
the
tx_ind_without_db_cache
branch
from
October 27, 2023 09:10
483c080
to
467e098
Compare
kobayurii
force-pushed
the
tx_ind_without_db_cache
branch
from
October 30, 2023 12:31
cfac3c5
to
a8008fa
Compare
khorolets
approved these changes
Oct 30, 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.
Overall looks good to me. I've left a couple of comments on wording
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In this PR we improve restore transactions in process from database to memcache. The main idea is to restore not all transactions in the process but only transactions that the indexer could potentially collect. For this, we use the range of blocks from the beginning of the index to minus 1000 blocks. This range should include all transactions that the indexer can collect.
Another point, in this PR we solve the problem of missing receipts.
In 2021 on the nearcore side an unfortunate situation/bug occurred. For some transactions Receipts haven't been created and were considered as missing. It was fixed with the patch and the protocol upgrade. The protocol team decided to include those Receipts in the first block of the "next" epoch. However, the number of missing receipts was 383 and they didn't fit into a single block, so they were included in the two sequential blocks: 47317863 and 47317864 See the PR#4248