-
Notifications
You must be signed in to change notification settings - Fork 20.4k
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
core/state/snapshot: detect and clean up dangling storage snapshot in generation #24811
Merged
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
8604adb
core/state/snapshot: check dangling storages when generating snapshot
rjl493456442 51f8a0e
core/state/snapshot: polish
rjl493456442 0ee1ebe
core/state/snapshot: wipe the last part of the dangling storages
rjl493456442 9b9dba1
core/state/snapshot: fix and add tests
rjl493456442 617eda9
core/state/snapshot: fix comment
rjl493456442 bbb6b94
README: remove mentions of fast sync (#24656)
nuoomnoy02 816f6cb
core, cmd: expose dangling storage detector for wider usage
rjl493456442 af23c13
core/state/snapshot: rename variable
rjl493456442 87d8bc3
core, ethdb: use global iterators for snapshot generation
rjl493456442 f4a489d
core/state/snapshot: polish
rjl493456442 5f37c25
cmd, core/state/snapshot: polish
rjl493456442 0584fc6
core/state/snapshot: polish
rjl493456442 546ce97
Update core/state/snapshot/generate.go
rjl493456442 b88d7ac
ethdb: extend db test suite and fix memorydb iterator
rjl493456442 e00ff21
ethdb/dbtest: rollback changes
rjl493456442 54caa24
ethdb/memorydb: simplify iteration
rjl493456442 7fca158
core/state/snapshot: update dangling counter
rjl493456442 e178af1
core/state/snapshot: release iterators
rjl493456442 3acad8d
core/state/snapshot: update metrics
rjl493456442 9a1ccd9
core/state/snapshot: update time metrics
rjl493456442 5df1225
metrics/influxdb: temp solution to present counter meaningfully, remo…
rjl493456442 d3fb321
add debug log, revert later
rjl493456442 83f60af
core/state/snapshot: fix iterator panic
rjl493456442 78ed542
all: customized snapshot iterator for backward iteration
rjl493456442 254666a
core, ethdb: polish
rjl493456442 1f5442d
core/state/snapshot: remove debug log
rjl493456442 55577d0
core/state/snapshot: address comments from peter
rjl493456442 61dcb92
core/state/snapshot: reopen the iterator at the next position
rjl493456442 c80a059
ethdb, core/state/snapshot: address comment from peter
rjl493456442 25b0392
core/state/snapshot: reopen exhausted iterators
rjl493456442 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
core/state/snapshot: release iterators
- Loading branch information
commit e178af17b5350b60672ddc1f7a400dc0fe06ea26
There are no files selected for viewing
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
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.
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.
Wondering if this is the appropriate location? If the snapshot is solid with only a few errors, it could happen that the iterator is held open for quite a long time, since the batch doesn't grow enough to trigger a write / reopen. Given that a node might be stuck on generation for many hours whilst still importing blocks, I think only reopening when enough snapshot errors are found might be dangerous?
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.
Yes you are right. For an almost-all-correct snapshot, this condition is not suitable.
However you said
Given that a node might be stuck on generation for many hours whilst still importing blocks
, I guess it only happens on some idle testnets right? Mainnet wise we will always abort and resume generation.But I will re think about where to place this code.