Skip to content

MDEV-40070 innodb_log_archive multi-batch recovery crash#5249

Closed
dr-m wants to merge 1 commit into
mainfrom
MDEV-40070
Closed

MDEV-40070 innodb_log_archive multi-batch recovery crash#5249
dr-m wants to merge 1 commit into
mainfrom
MDEV-40070

Conversation

@dr-m

@dr-m dr-m commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

recv_sys_t::parse_mmap(): When the current mini-transaction spans two log files and we run out of memory while attempting to store the parsed records into recv_sys.pages, the next log file would already have been closed by recv_sys_t::rewind(). Handle this condition specially.

This fixes a regression that was introduced in #4405. A copy of a data directory with which this crash was reproduced is available in MDEV-40070.

@dr-m dr-m requested a review from Thirunarayanan June 17, 2026 05:20
@dr-m dr-m self-assigned this Jun 17, 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.

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

Copy link
Copy Markdown

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 modifies the recovery logic in storage/innobase/log/log0recv.cc to conditionally complete the archived mmap switch and assert an out-of-memory status (GOT_OOM) if the switch is not active. The reviewer suggests a more robust approach by checking r != GOT_OOM as the primary condition, which ensures the switch is only completed on successful paths and prevents potential issues if the switch was not properly aborted during an OOM scenario.

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.

Comment thread storage/innobase/log/log0recv.cc Outdated
recv_sys_t::parse_mmap(): When the current mini-transaction spans two
log files and we run out of memory while attempting to store the parsed
records into recv_sys.pages, the next log file would already have been
closed by recv_sys_t::rewind(). Handle this condition specially.
@dr-m dr-m closed this Jun 17, 2026
@dr-m dr-m deleted the MDEV-40070 branch June 17, 2026 12:01
@dr-m

dr-m commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

The approved change 15f09a1 was pushed to the 13.0 branch with that commit hash. I had forgotten to adjust the correct target branch; it defaulted to main in this pull request, while 13.0 would have been correct. GitHub does not allow me to reopen this pull request or correct the target branch.

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