-
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, trie, triedb: port changes from the snapshot integration #30599
core, trie, triedb: port changes from the snapshot integration #30599
Conversation
@@ -558,7 +556,4 @@ func (h *handler) enableSyncedFeatures() { | |||
log.Info("Snap sync complete, auto disabling") | |||
h.snapSync.Store(false) | |||
} | |||
if h.chain.TrieDB().Scheme() == rawdb.PathScheme { |
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.
The buffer flushing can be performed in the background, see #30464 for more details.
This buffer adjustment is not relevant anymore
36e3eb9
to
2d59745
Compare
2b84983
to
ed975de
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.
These changes seem fairly straight-forward to me.
return err | ||
} | ||
log.Debug("Journaled pathdb diff layer", "root", dl.root, "parent", dl.parent.rootHash(), "id", dl.stateID(), "block", dl.block, "nodes", len(dl.nodes)) | ||
log.Debug("Journaled pathdb diff layer", "root", dl.root, "parent", dl.parent.rootHash(), "id", dl.stateID(), "block", dl.block) | ||
return nil | ||
} |
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.
Github won't let me add comments to stuff you didn't change, Just wanted to add a note that the usage of disk.buffer.layers in Journal might be a bit racy, but its okay since its for logging output only
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.
Which line? We don't use disk.buffer.layers
here?
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.
a bit racy, but its okay since its for logging output only
No, actually that's not okay. If it's racy, then it's a problem (?)
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.
Line 237 and Line 239
There we use disk.buffer.layers
without acquiring the journal lock first. All other instance where disk.buffer
is used, we acquire the locks first before using it
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.
Yeah, 237 and 239 is in the Journal function, which is only called when the Geth is terminated.
I will try to fix it in a following PR
ed975de
to
ef42ebb
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.
LGTM
This change ports some non-important changes from #30159, including interface renaming and some trivial refactorings.
…#30599) This change ports some non-important changes from ethereum#30159, including interface renaming and some trivial refactorings.
This pull request ports some non-important changes from the #29754 , including interface rename, refactoring, etc.