Skip to content

Commit

Permalink
Take version_lock when creating reserved Tx (#6633)
Browse files Browse the repository at this point in the history
Co-authored-by: Amaury Chamayou <amchamay@microsoft.com>
  • Loading branch information
eddyashton and achamayou authored Nov 12, 2024
1 parent 79cb8c7 commit 97e709b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/kv/store.h
Original file line number Diff line number Diff line change
Expand Up @@ -1255,8 +1255,7 @@ namespace ccf::kv

ReservedTx create_reserved_tx(const TxID& tx_id)
{
// version_lock should already been acquired in case term_of_last_version
// is incremented.
std::lock_guard<ccf::pal::Mutex> vguard(version_lock);
return ReservedTx(this, term_of_last_version, tx_id, rollback_count);
}

Expand Down

0 comments on commit 97e709b

Please sign in to comment.