THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
lastFinishedCutId
holds previous ConsistentCutId
, or null.SnapshotOperationRequest
that holds new ConsistentCutId
(goal is to notify every node in a cluster about running incremental snapshot). SnapshotOperationRequest#ConsistentCutId
by DiscoverySPI (by the DistributedProcess).ConsistentCutAwareMessage#ConsistentCutId
by CommunicationSPI (by transaction messages - Prepare, Finish).ConsistentCutId
it starts local ConsistentCut: ConsistentCut
!= null) or finished (lastFinishedCutId
== id) for this id, skip if it has.ConsistentCutAwareMessage#topVer
with local node order:ConsistentCut
future. If node is non-baseline (client, non-baseline servers) - complete it right after creation.ConsistentCut != null
wraps outgoing messages to ConsistentCutAwareMessage
. It contains info:ConsistentCutId
(to start ConsistentCut on remote node, if not yet).txCutId
equals to null then transaction starts committing Before
Consistent Cut started, otherwise After
.ConsistentCutAwareMessage
that makes transaction committed (FinishRequest for 2PC, PrepareResponse for 1PC) sets tx#txCutId = message#txCutId
.ConsistentCut
future.removedActiveTxs
(This collection doesn't remove transactions unlike IgniteTxManager#activeTx
does).ConsistentCutStartRecord
to WAL with the received ConsistentCutId
.IgniteTxManager#activeTx
. Set listeners on those tx#finishFuture
.tx#status == ACTIVE
. It's guaranteed that such transactions belongs After side.removedActiveTxs
(contains transactions that are might be cleaned from IgniteTxManager#activeTx
). Set listeners on those tx#finishFuture
.removedActiveTxs
to null. We don't care of txs concurrently added to removedActiveTxs
, they just don't land into "before" or "after" set and will be excluded from recovery.removedActiveTxs
if ConsistentCut != null
and removedActiveTxs != null
:removedActiveTxs
right before it is removed from IgniteTxManager#activeTx
.tx#txCutId
equals to local, then put transaction into after, otherwise put into before.ConsistentCutFinishRecord
into WAL with the collections ( before, after ). ConsistentCut
future.ConsistentCut
future becomes null....