codership / mysql-wsrep

wsrep API patch for MySQL server
Other
65 stars 34 forks source link

event processing may lead to data inconsistency in cluster #347

Closed sjaakola closed 6 years ago

sjaakola commented 6 years ago

Cluster data inconsistency may be caused if following conditions hold:

  1. an event fires, and event execution processes rows acquiring InnoDB GAP locks
  2. event execution has advanced to replication phase, but has not committed yet
  3. replication applies a write set, which writes over the event's GAPs, and as a result the event will be aborted

Because the event has already replicated, other cluster nodes, will apply the event. Only the originating node will rollback the transaction, and the data state in originating node will differ by the changes done by the event execution. When the event fires next time, and if it processes the same data set again, it may result in inconsistency aborting of all other nodes in the cluster.

sjaakola commented 6 years ago

The fix for #336 is effective fix for this issue as well, and only a separate mtr test will be pushed for this issue