From 0679e563c534cf31fc452cfcc368e2475ebbb971 Mon Sep 17 00:00:00 2001 From: Bart Wyatt Date: Thu, 25 Apr 2019 09:55:50 -0400 Subject: [PATCH] when replay optimizations are disabled we still create database sessions however, we were never committing those database sessions leaving lots of stale undo states around until the very end of the replay --- libraries/chain/controller.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/chain/controller.cpp b/libraries/chain/controller.cpp index 1b1f914db2d..1b08ca335a5 100644 --- a/libraries/chain/controller.cpp +++ b/libraries/chain/controller.cpp @@ -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" );