Skip to content

Conversation

@UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Dec 17, 2018

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.

@UdjinM6 UdjinM6 added this to the 13.0 milestone Dec 17, 2018
Copy link

@codablock codablock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@codablock codablock merged commit 6dfceab into dashpay:develop Dec 19, 2018
codablock added a commit to codablock/dash that referenced this pull request Mar 6, 2019
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
@UdjinM6 UdjinM6 deleted the forceflushstateblocktip branch November 26, 2020 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants