-
Notifications
You must be signed in to change notification settings - Fork 2k
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
undo BlockRecord cache insert, when DB fails #16909
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
d0c3615
to
cddd90d
Compare
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.
aok
earle had issues so holding off for now |
Dismissing because he doesn't actually want this merged yet
cddd90d
to
0750d4e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
2b18bd9
to
2349e33
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Pull Request Test Coverage Report for Build 7039010402Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - Coveralls |
This comment was marked as outdated.
This comment was marked as outdated.
…the block cache in BlockStore, but we currently don't undo the insertion of the block record into the block-record cache in Blockchain.
2349e33
to
36c38eb
Compare
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.
aok
We currently have two caches on top of the block store database.
BlockStore
itself keeps an LRU of recently requestedFullBlock
objects.Blockchain
class keeps recentBlockRecords
in a cache (recent, as in close to the peak)When we fail to insert a block in the DB, we undo the insertion into the block cache in
BlockStore
, but we currently don't undo the insertion of the block record into the block-record cache in Blockchain.This PR fixes that.
Additionally, this PR rolls back any additions and removals from
ForkInfo
, if they have been added while validating the block.