Skip to content

MDEV-38843: WSREP: BF applier failed on a node causing complete Cluster lockup - #5335

Open
hemantdangi-gc wants to merge 1 commit into
MariaDB:10.6from
mariadb-corporation:10.6_MDEV-38843_1
Open

MDEV-38843: WSREP: BF applier failed on a node causing complete Cluster lockup#5335
hemantdangi-gc wants to merge 1 commit into
MariaDB:10.6from
mariadb-corporation:10.6_MDEV-38843_1

Conversation

@hemantdangi-gc

Copy link
Copy Markdown
Contributor

Issue:
After losing an inconsistency vote the node leaves the primary component while an applier still has an active transaction (its commit failed, so after_apply() cleanup was skipped). The applier is torn down and client_state::close() calls transaction::after_statement() on it, which asserts m_local and aborts the server in debug builds.

Solution:
Route the high priority transactions through after_applying() in close().

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

Issue: When an applier commit fails (e.g. commit order could not be
entered because the node is leaving the primary component), the caller
skipped after_apply() and left the transaction active. It is then carried
to client_state::close(), which runs the local-only after_statement() and
asserts client_state_.mode() == m_local in debug builds.

Solution: Bump wsrep-lib to roll back and call after_apply() on the commit
error path. Add simulate_commit_failure_in_applier and a deterministic
test.
@mariadb-TeemuOllakka

Copy link
Copy Markdown

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses MDEV-38843 by ensuring that an applier torn down with an active transaction does not trigger an assertion in transaction::after_statement() during cleanup. It introduces a new regression test galera_applier_close_active_trx, adds a debug simulation point simulate_commit_failure_in_applier in Wsrep_high_priority_service::commit, and updates the wsrep-lib submodule. There are no review comments, and we have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants