...
- Initial state:
- Ignite WAL are in consistent state relatively to previous full or incremental snapshot.
- Every Ignite node has local ConsistentCut future equals to
null (node is WHITE)
. - Empty collection committingTxs (Set<GridCacheVersion>) that goal is to track COMMITTING+ transactions, that aren't part of
IgniteTxManager#activeTx
. It's automatically shrinks after transaction committed.
- Ignite node inites a global snapshot, by starting DistributedProcess (by discovery IO):
- creates a new ConsistentCutMarker.
- prepares a marker message that contains the marker and transmits this message to other nodes.
- Every nodes starts a local snapshot process after receiving the marker message (whether by discovery, or by communication with transaction message)
- Atomically: creates new ConsistentCut future (node becomes RED), creates committingTxs, starts signing outgoing messages with the ConsistentCutMarker.
- Write a snapshot record to WAL with the received ConsistentCutMarker (commits LocalState).
- Collect of active transactions - concat of
IgniteTxManager#activeTx
and committingTxs - Prepares 2 empty collections - before[sent - received] andafter[excludereceived, but not sent] cut.
- While global Consistent Cut is running every node signs output transaction messages:
- Prepare messages signed with the ConsistentCutMarker (to trigger ConsistentCut on remote node, if not yet).
- Finish messages signed with the ConsistentCutMarker (to trigger...) and transaction ConsistentCutMarker (to notify nodes which side of cut this transaction belongs to).
- Finish messages is signed on node that commits first (near node for 2PC, backup or primary for 1PC).
- For every collected active transaction, node waits for Finish message, to extract the ConsistentCutMarker and fills before, after collections:
- if received marker is null or differs from local, then transaction on before side
- if received color equals to local, then transaction on after side
- After all transactions finished:
- Writes a finish WAL record with ChannelState (before, after).
- Stops filling committingTxs.
- Completes ConsistentCut future, and notifies a node-initiator about finishing local procedure (with DistributedProcess protocol).
- After all nodes finished ConsistentCut, every node stops signing outgoing transaction messages - ConsistentCut becomes future becomes null (node is WHITE again).
...
{"serverDuration": 169, "requestCorrelationId": "e889caac3f54ea46"}