-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3514: Fix clean state initialization r=nfrisby a=Jasagredo Due to the unmasking of exceptions during ChainDB initialization, it is the case right now that the exit code is different from `DatabaseCorruption` and therefore the `withCheckedDb` function considers that it has to create the clean file. Because of this, a Ctrl+C during initialization would skip the validation on the next startup. This PR ensures that the clean file is only removed after the chainDB is initialized (and therefore potentially modified) and from that point on it can be created again. | initial status | killed when | on `SIGKILL` | on `DatabaseCorruption` | on other exception (e.g. `^C`) | |----------------|-----------------------|------------------|------------------------|---------------------------| | clean | during initialization | unclean → clean | clean → unclean | clean | | clean | after initialization | unclean | unclean | clean | | unclean | during initialization | unclean | unclean | clean → unclean | | unclean | after initialization | unclean | unclean | clean | Co-authored-by: Javier Sagredo <javier.sagredo@iohk.io>
- Loading branch information
Showing
2 changed files
with
124 additions
and
88 deletions.
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