[MDEV-32823] Sequences may diverge with Galera Created: 2023-11-16 Updated: 2023-12-18 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Galera |
| Affects Version/s: | 10.4 |
| Fix Version/s: | 10.4, 10.5, 10.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Daniele Sciascia | Assignee: | Daniele Sciascia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Sequences may diverge when used in a Galera cluster.
shows that it is possible to consume a value from a sequence on one node, and that value may end up being be reused on a different node. For this to happen the sequence must be used within a transaction that is rolled back (as shown above). Also, if binlog is enable, they will diverge. On node 1 we have two events, for the corresponding calls to SELECT NEXTVAL(s1):
While node 2, not only misses the events from node 1, it also has a different gtid:
In the example above, we used voluntary ROLLBACK. The same issue is likely to happen if a transaction using sequences is rolled back due to cluster wide conflict. |