Skip to content

MDEV-39594 Assertion failure during MYSQL_BIN_LOG::recover#5089

Merged
dr-m merged 2 commits into
mainfrom
MDEV-39594
May 18, 2026
Merged

MDEV-39594 Assertion failure during MYSQL_BIN_LOG::recover#5089
dr-m merged 2 commits into
mainfrom
MDEV-39594

Conversation

@dr-m
Copy link
Copy Markdown
Contributor

@dr-m dr-m commented May 18, 2026

innobase_recover_rollback_by_xid(): Add a similar condition to the one that was in innobase_rollback_by_xid() and innobase_commit_by_xid(). Also, remove the now-redundant DBUG_EXECUTE_IF fault injection and exercise this code by specifying a nonzero innodb_log_recovery_target.

This function had been introduced in #3030 which was not present in the development branch of #4405, which had been applied to the main branch in 3394a9d.

innobase_recover_rollback_by_xid(): Add a similar condition to the
one that was in innobase_rollback_by_xid() and innobase_commit_by_xid().
Also, remove the now-redundant DBUG_EXECUTE_IF fault injection and
exercise this code by specifying a nonzero innodb_log_recovery_target.

This function had been introduced in
commit 5bbda97 (MDEV-33853),
which wes not present in the development branch of MDEV-37949.
@dr-m dr-m requested a review from Thirunarayanan May 18, 2026 08:31
@dr-m dr-m self-assigned this May 18, 2026
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown

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

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 removes the innobase_xa_fail debug flag and updates the tc_heuristic_recover.test to use --innodb-log-recovery-target instead. In ha_innodb.cc, the DBUG_EXECUTE_IF blocks for innobase_xa_fail are removed, and innobase_recover_rollback_by_xid is updated to check recv_sys.rpo. Feedback suggests adding the noexcept specifier to innobase_recover_rollback_by_xid for consistency with other rollback functions.

DBUG_EXECUTE_IF("innobase_xa_fail", return XAER_RMFAIL;);

if (high_level_read_only)
if (high_level_read_only || recv_sys.rpo)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The function innobase_recover_rollback_by_xid is missing the noexcept specifier, which is present in its sibling function innobase_rollback_by_xid (line 2810). For consistency and to potentially allow for better compiler optimizations, consider adding noexcept to this function signature as well, provided it is guaranteed not to throw.

static int innobase_recover_rollback_by_xid(const XID *xid) noexcept

@dr-m dr-m merged commit 7f0ed40 into main May 18, 2026
17 of 19 checks passed
@dr-m dr-m deleted the MDEV-39594 branch May 18, 2026 09:35
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