Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
when replay optimizations are disabled we still create database sessi…
Browse files Browse the repository at this point in the history
…ons however, we were never committing those database sessions leaving lots of stale undo states around until the very end of the replay
  • Loading branch information
b1bart committed Apr 25, 2019
1 parent 9247373 commit 0679e56
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1846,6 +1846,11 @@ struct controller_impl {
// On replay, log_irreversible is not called and so no irreversible_block signal is emittted.
// So emit it explicitly here.
emit( self.irreversible_block, bsp );

if (!self.skip_db_sessions(s)) {
db.commit(bsp->block_num);
}

} else {
EOS_ASSERT( read_mode != db_read_mode::IRREVERSIBLE, block_validate_exception,
"invariant failure: cannot replay reversible blocks while in irreversible mode" );
Expand Down

0 comments on commit 0679e56

Please sign in to comment.