Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.11
-
None
-
Not for Release Notes
-
Q4/2026 Replic. Development
Description
On a Galera node, pending row events can go missing at commit time.
This happens in two cases:
- The server's own binary log is off. run_binlog_first() in sql/handler.cc has no path to flush pending row events when the binlog storage engine did not take part in the transaction.
- A statement inside an open transaction fills the statement cache on its own, for example a NOCACHE sequence's internal commit. binlog_commit() in sql/log.cc skips flushing the statement cache when Galera is on and the transaction has not ended yet.
Fix:
- run_binlog_first() now writes pending row events on commit when Galera is on and no binlog storage engine took part in the transaction.
- binlog_commit() now writes the statement cache instead of skipping it, when Galera is on and the transaction has not ended yet.
A new regression test checks both cases: the server's binary log on and off, and a transaction that commits partway through with a NOCACHE sequence.
This was first investigated under MDEV-40355 ("galera.MDEV-27862 test failure"). Stress-testing (locally, up to 2000 runs at --parallel=64) showed MDEV-40355's actual reported failures are CI host contention, SST/quorum establishment failing under parallel load on the ppc64le, aarch64 and s390x builders, not this bug. Splitting this fix out into its own ticket, since it is real but does not explain MDEV-40355.
Created via the jira-create skill.