Skip to content

Praefect: Fix transaction voter state race

Justin Tobler requested to merge jt-fix-transaction-race into master

When creating a new subtransaction previous voter state needs to be propagated forward so the new subtransaction can be aware of previously canceled voters. While reading the voter result state of the previous subtransaction, the subtransaction could also have its voter state updated through a call to updateVoterState().

This change moves voter propagation logic to a new subtransaction method getPropagatedVoters(). This method locks its associated subtransaction to prevent concurrent writes to its voter result state.

Closes: #4602 (closed)

Edited by Justin Tobler

Merge request reports