Force FlushStateToDisk on ConnectTip/DisconnectTip while not in IBD#2560
Merged
codablock merged 1 commit intodashpay:developfrom Dec 19, 2018
Merged
Force FlushStateToDisk on ConnectTip/DisconnectTip while not in IBD#2560codablock merged 1 commit intodashpay:developfrom
codablock merged 1 commit intodashpay:developfrom
Conversation
codablock
added a commit
to codablock/dash
that referenced
this pull request
Mar 6, 2019
…in IBD (dashpay#2560)" This reverts commit 6dfceab.
UdjinM6
pushed a commit
that referenced
this pull request
Mar 6, 2019
…ashes (#2744) * Let Commit() return void The boolean return value will loose its meaning in the next commit * Implement 2-stage commits for CDBTransaction and CScopedDBTransaction CDBTransaction is changed to allow CDBBatch, CDBWrapper and other CDBTransactions as parent instead of just CDBWrapper. This in turn allows to implement multi-staged commits in CEvoDB. We now have the "current transaction" which is started and ended (commit or rollback) for each call to Connect-/DisconnectBlock. When the current transaction is committed, it moves its contents into the "root transaction" instead of directly writing to CDBWrapper. CommitRootTransaction() then handles the final commitment to CDBWrapper. It is called at the same time when the chainstate is flushed to disk, which guarantees consistency between chainstate and CEvoDB. * Allow to efficiently move values into parent transactions to avoid copies When CDBTransaction<CDBTransaction<...>>::Commit() is called, we can avoid copying values from this transaction to the parent transaction and instead pass values by rvalue and let the contents be moved. * Revert "Force FlushStateToDisk on ConnectTip/DisconnectTip while not in IBD (#2560)" This reverts commit 6dfceab.
codablock
added a commit
to codablock/dash
that referenced
this pull request
Mar 7, 2019
…ashes (dashpay#2744) * Let Commit() return void The boolean return value will loose its meaning in the next commit * Implement 2-stage commits for CDBTransaction and CScopedDBTransaction CDBTransaction is changed to allow CDBBatch, CDBWrapper and other CDBTransactions as parent instead of just CDBWrapper. This in turn allows to implement multi-staged commits in CEvoDB. We now have the "current transaction" which is started and ended (commit or rollback) for each call to Connect-/DisconnectBlock. When the current transaction is committed, it moves its contents into the "root transaction" instead of directly writing to CDBWrapper. CommitRootTransaction() then handles the final commitment to CDBWrapper. It is called at the same time when the chainstate is flushed to disk, which guarantees consistency between chainstate and CEvoDB. * Allow to efficiently move values into parent transactions to avoid copies When CDBTransaction<CDBTransaction<...>>::Commit() is called, we can avoid copying values from this transaction to the parent transaction and instead pass values by rvalue and let the contents be moved. * Revert "Force FlushStateToDisk on ConnectTip/DisconnectTip while not in IBD (dashpay#2560)" This reverts commit 6dfceab.
CryptoCentric
pushed a commit
to absolute-community/absolute
that referenced
this pull request
Jun 29, 2020
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This should ensure that chainstate and evodb are in sync whenever a crash happens (during normal operations, not while in IBD). Slightly tested this and it seems like it doesn't affect performance in any noticeable way.