Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-41428

Galera can lose pending row events at commit time

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.11
    • N/A
    • Galera, Tests, MTR
    • 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.

      Attachments

        Activity

          People

            seppo Seppo Jaakola
            janlindstrom Jan Lindström
            Seppo Jaakola Seppo Jaakola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 4.25h
                4.25h

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.