THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Picture bellow illustrates steps of the algorithm on single node:
lastFinishedCutId
holds previous ConsistentCutId
, or null.DistributedProcess
with message SnapshotOperationRequest
that holds new ConsistentCutId
(goal is to notify every node in a cluster about running incremental snapshot). topVer
on which ConsistentCut started.SnapshotOperationRequest#ConsistentCutId
by DiscoverySPI (by the DistributedProcess).ConsistentCutAwareMessage
#ConsistentCutId
by CommunicationSPI (by transaction messages - Prepare, Finish).ConsistentCutId
, every node: lastFinishedCutId
== id) for this id, skip if it has.ConsistentCutAwareMessage#
topVer
with local node order:topVer
then the node joined after ConsistentCut started. Skip local ConsistentCut.ConsistentCut
future.committingTx
(this collection fill with transactions in COMMITTING state, and it doesn't remove transactions unlike IgniteTxManager#activeTx
does).ConsistentCutAwareMessage
(contains ConsistentCutId
).ConsistentCutStartRecord
to WAL with the received ConsistentCutId
.IgniteTxManager#activeTx.
Set listeners on those tx#finishFuture.
After
side.committingTxs
(contains transactions that are already cleaned from IgniteTxManager#activeTx
).
Set listeners on those tx#finishFuture.
committingTxs
to null.
DistributedProcess
is running every node wraps outgoing transaction messages (Prepare, Finish) to ConsistentCutAwareMessage (
transaction has not committed yet on sender node)
or ConsistentCutAwareTxFinishMessage (
transaction has committed on a sender node)
. Messages contain info:ConsistentCutId
(to trigger ConsistentCut
on remote node, if not yet).ConsistentCutAwareTxFinishMessage
messages contains additionally txCutId
.
It set on the node that commits first (if it's not null then transaction starts committing After
Consistent Cut):committingTxs
:committingTxs
right before it is removed from IgniteTxManager#activeTx.
ConsistentCutAwareTxFinishMessage
Ignite marks the related transaction with message#txCutId.
check If transaction state is UNKNOWN or status is RECOVERY_FINISH, then complete ConsistentCut with exception.
topVer
, then put it into after
(topology changed after ConsistentCut started).txCutId
equals to local, then put transaction into after
, otherwise put into before
.ConsistentCutFinishRecord
into WAL with the collections ( before
, after
). ConsistentCut
future.ConsistentCut,
on every node:lastFinishedCutId
with the current id.
ConsistentCut
future becomes null....