MDEV-39594 Assertion failure during MYSQL_BIN_LOG::recover#5089
Conversation
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.
|
|
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
innobase_recover_rollback_by_xid(): Add a similar condition to the one that was ininnobase_rollback_by_xid()andinnobase_commit_by_xid(). Also, remove the now-redundantDBUG_EXECUTE_IFfault injection and exercise this code by specifying a nonzeroinnodb_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
mainbranch in 3394a9d.