1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Files
Marko Mäkelä d5027ae19b MDEV-41152: Fix FILE_CREATE recovery
fil_name_process(): Treat FILE_CREATE in the same way as FILE_MODIFY
that led to a FIL_LOAD_DEFER return. Remove the parameter lsn,
and return file_name_t& in which the caller may assign create_lsn
when processing a FILE_CREATE record.

deferred_spaces.reinit_all(): Never create anything for deleted
tablespaces. Doing so could cause a legitimate file to be deleted
if files are being deleted and re-created with the same name.

deferred_space.create(): Remove some duplicated code. Missing
tablespace files will be created in fil_node_open_file_low()
starting with
commit 759e3523e3 (MDEV-38026).

deferred_spaces::item::lsn: Remove. Starting with
commit 37d8577aee (MDEV-40728)
each FILE_ record is parsed only once.

recv_sys_t::parse_store_if_exists(): Tell the caller to skip
tablespaces for which both FILE_CREATE and FILE_DELETE was parsed.
This improves performance, not correctness.

recv_validate_tablespace(): Avoid duplicated tablespace lookup
and remove a redundant deferred_spaces.add(); fil_name_process
already keeps deferred_spaces in sync with recv_spaces.

fil_space_t::rename(): If !log, assert !replace and that
the target file name does not exist.

os_file_rename_func(): Do not check that the target path
does not exist. This is already checked by every caller.
This fixes a debug assertion failure that could otherwise
occur when recovering from a crash in
fil_space_t::rename() between the write of the FILE_RENAME
and the actual rename.

Reviewed by: Thirunarayanan Balathandayuthapani
Tested by: Saahil Alam

(cherry picked from commit bdff5b8f24)
2026-09-21 15:00:35 +03:00
..
2026-08-20 08:27:14 +02:00
2026-09-04 12:21:02 +02:00
2026-08-20 08:27:14 +02:00
2026-05-26 21:15:58 +02:00
2026-03-24 09:49:17 +02:00
2026-09-04 12:14:15 +02:00
2026-09-10 18:03:22 +03:00
2026-09-04 12:21:02 +02:00
2026-08-20 08:27:14 +02:00
2026-07-30 11:41:55 +02:00
2026-06-15 16:53:03 +02:00
2026-09-04 12:21:02 +02:00
2026-09-04 12:21:02 +02:00
2026-08-03 13:42:39 +02:00
2026-05-26 21:15:58 +02:00