-
Notifications
You must be signed in to change notification settings - Fork 27
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
[3.2] log integrity hash on start/stop with integrity-hash-on-start & integrity-hash-on-stop options #395
Merged
Merged
[3.2] log integrity hash on start/stop with integrity-hash-on-start & integrity-hash-on-stop options #395
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a70d6d5
log db hash on start/stop with integrity-hash-on-start & integrity-ha…
spoonincode 3019dcd
just use a bool to track when it's acceptable to log exit hash
spoonincode 0f9ac1b
missed staging a rename in last commit
spoonincode 2d01629
move integrity-hash-on options from CLI to Cfg
spoonincode 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
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
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
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.
eh something better?
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.
Move the chain_plugin where you know if started successfully?
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.
I can't log the startup in chain_plugin because I need to to do the log before replay but after snapshot is loaded. So, it felt weird to do the startup log in controller but the shutdown log in chain_plugin.
I'm not sure doing it in chain_plugin really helps either since there are so many exceptions that can start unrolling the world at any time.
Actually I'm not really even sure this here works well enough: what if an exception is thrown half way through loading a snapshot. Then once everything unrolls the dtor is fired and if datebase_header made it then it does an integrity computation with a half initialized state? That's what I want to avoid.
But I also wanted to avoid adding a
bool yep_controller_started_up
. It's kinda wild there isn't a clear indicator anywhere 🤔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.
In
chain_plugin::plugin_startup
you could add acatch(...)
after thedatabase_guard_exception
catch and add amy->chain.reset();
. Then inchain_plugin::plugin_shutdown()
you could checkmy->chain
to know if it is valid, if so then log the integrity.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.
I capitulated and just added a bool 😕