Details
Description
Scenario:
We have a three‑node cluster consisting of two database nodes and one arbitrator. All read/write transactions are directed to the primary node (N1), while the other node (N2) serves as a secondary node for read‑only operations.
We performed a version upgrade from 10.11.15 to 10.11.18 using a rolling upgrade approach:
Upgrade N2 to version 10.11.18.
Switch roles so that N2 (10.11.18) becomes the primary node and N1 (10.11.15) becomes the secondary node.
Under high concurrency, multiple SELECT NEXTVAL operations were executed on the sequence object in N2 (primary, 10.11.18). This frequently caused N1 (secondary, 10.11.15) to hang, with the following error message recorded in the database error log:
2026-06-11 8:51:17 1 [Note] WSREP: MDL BF-BF conflict
schema: test
request: (1 seqno 73433152 wsrep (high priority, exec, executing) cmd 0 161 call select_nextval(10000000, 0.1, 5)▒*j)
granted: (15 seqno 73433151 wsrep (high priority, exec, ordered_commit) cmd 0 161 (null))
2026-06-11 8:51:17 1 [ERROR] Aborting
Steps to Reproduce:
1. Set up a database cluster with two DB nodes (N1 and N2, both running version 10.11.15) and one arbitrator.
2. Upgrade N2 to version 10.11.18.
3. Create a test database schema and define a sequence object with zero cache:
CREATE SEQUENCE s START WITH 1 INCREMENT BY 0 CACHE = 0;
4. Create a stored procedure that continuously executes SELECT NEXTVAL(s). (See attached code for the stored procedure.)
5. Open two separate database sessions by connecting two individual MySQL clients to N2.
6. In each session, run the stored procedure simultaneously so that SELECT NEXTVAL(s) executes every 0.1 seconds:
CALL select_nextval(10000000, 0.1, 5);
7. After some time, N1 (secondary node, version 10.11.15) will log the above error message and hang.
We would appreciate any suggestions or workarounds to avoid this issue during rolling upgrades.