Versions Compared

Key

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

...

Crash recovery
When a node’s primary collapse , a situation under load situations may arise where there may be forever permanent gaps in the updates on backup nodes in the event of transaction reordering: transactions .

1.

Transactions that started later with a higher counter value were completed prepared before the transaction with a lower counter value was fixed and then the primary dropped, without sending the missing updateswere able to be prepared on at least one backup.
In this case, the pass gaps will be closed on node left PME, and similarly closed in WAL using RollbackRecord if persistence is enabled

In the case of tx recovery, if it is decided to roll back the transaction, a situation is possible when one of the dht nodes did not receive information about the start of the transaction, while the others received it.
This will result in a counter out of sync. To prevent dht problems, the nodes will exchange information about the counters in the neightborcast request with each other, and thus the counters in the partitions on all the host nodes will be aligned.

.

This scenario is handled by org.apache.ignite.internal.processors.cache.PartitionUpdateCounter#finalizeUpdateCounters

2.

Transactions that started later with a higher counter value were prepared before the transaction with a lower counter value were able to be prepared only on some backups, but not all. This means some of backups never seen a counter update.

In this case, the gaps will be closed by special king of message on tx rollback (neightborcast(?) request), and similarly closed in WAL using RollbackRecord if persistence is enabled.

Switching primaries

If the primary node fell out, then one of the backups becomes the new node, and due to the PME protocol atomic switching to the new primary takes place, where hwm becomes equal to the last known lwm for partition (see Figure 2).Switching primaries
It is important to ensure the atomicity of switching the node’s primaries for partitioning in node entry or exit scenarios, otherwise the HWM >= LWM invariant will break, which ensures that if at least one stable copy is available, everyone else can restore its integrity from it. This is achieved due to the fact that transactions on the previous topology are completed before switching (as a phase of the PME protocol) to a new one and the situation when two primaries of a node simultaneously exist in a grid for one partition is impossible.

...