Skip to content

MDEV-40728 Recovery wrongly fails if FILE_CREATE is followed by FILE_RENAME - #5530

Open
dr-m wants to merge 1 commit into
13.0from
MDEV-40728
Open

MDEV-40728 Recovery wrongly fails if FILE_CREATE is followed by FILE_RENAME#5530
dr-m wants to merge 1 commit into
13.0from
MDEV-40728

Conversation

@dr-m

@dr-m dr-m commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

fil_name_process(): Simplify the logic. If no matching tablespace is found but file_name_t::create_lsn had been set in response to parsing a FILE_CREATE record, try to apply FILE_RENAME to deferred_spaces.

deferred_spaces.deferred_dblwr(): Skip newly created tablespaces to avoid a bogus invocation of fil_space_free().

fil_delete_apply(): A wrapper for fil_space_free(). When recovering a log in innodb_log_archive=ON format, we must apply FILE_DELETE records in order to avoid a future clash with FILE_CREATE or FILE_RENAME.

@dr-m
dr-m requested a review from Thirunarayanan August 11, 2026 12:06
@dr-m dr-m self-assigned this Aug 11, 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.

@Thirunarayanan Thirunarayanan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wrongly approved this one instead of pr#5531

@dr-m
dr-m requested a review from Thirunarayanan August 13, 2026 10:35
…RENAME

fil_name_process(): Simplify the logic. If no matching tablespace is
found but file_name_t::create_lsn had been set in response to parsing
a FILE_CREATE record, try to apply FILE_RENAME to deferred_spaces.

deferred_spaces.deferred_dblwr(): Skip newly created tablespaces
to avoid a bogus invocation of fil_space_free().

fil_delete_apply(): Wrappers for fil_space_free(). When recovering
a log in innodb_log_archive=ON format, we must apply FILE_DELETE
records in order to avoid a future clash with FILE_CREATE or FILE_RENAME.
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