Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Initial state:
    1. Ignite nodes started from snapshot, or other consistent state (after graceful cluster stop / deactivation).
    2. var color = WHITE .
    3. 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.
  2. After some time, Ignite nodes might have non-empty committingTxs.
  3. Ignite node inites a global snapshot, by starting DistributedProcess (by discovery IO).
  4. Every nodes starts a local snapshot process after receiving a mark message (whether by discovery, or by communication with transaction message) 
    1. Atomically: set color = RED and disable auto-shrink of committingTxs.
    2. write a snapshot record to WAL (commits LocalState).
    3. Collect of active transactions - concat of IgniteTxManager#activeTx and committingTxs 
    4. While receiving Finish messages from other nodes, node fills ChannelState: exclude and (sent - received) collections. 
    5. After all transactions finished, it writes a WAL record with ChannelState.
  5. New color is sent with transaction Finish messages.
  6. Committing node add an additional color field for FinishMessage, that shows whether to include transaction to snapshot, or not. 
  7. Other nodes on receiving a marker with new color starts a local snapshot (see steps from point 3).
  8. Notifies a node-initiator about finishing local procedure (with DistributedProcess protocol).
  9. For all nodes color = RED . Next snapshot iteration will started with changing color to WHITE . 

Use node-local xid (GridCacheVersion) as

...

snapshot version threshold

To avoid using mark message (color field) we can try rely on fixed GridCacheVersion. Algorithm is as follows:

...