Transition to ready has to occur precisely once, so the process of
taking cohorts has to be synchronized.
Change-Id: I8ba8fe7437dd59547d04fec73f5cd9ed43232161
Signed-off-by: Robert Varga <rovarga@cisco.com>
this.broker = broker;
}
- public Iterable<DOMStoreThreePhaseCommitCohort> ready() {
+ public synchronized Iterable<DOMStoreThreePhaseCommitCohort> ready() {
checkState(cohorts == null, "Transaction was already marked as ready.");
ImmutableList.Builder<DOMStoreThreePhaseCommitCohort> cohortsBuilder = ImmutableList.builder();
for (DOMStoreWriteTransaction subTx : getSubtransactions()) {