Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Critical
-
Resolution: Unresolved
-
13.0
-
Related to performance
-
Q2/2026 Server Maintenance
Description
I made a questionable design choice in MDEV-37949 in order to simplify the initial implementation of the innodb_log_archive=ON format: When a new ib_*.log file is being created and extended to innodb_log_file_size, we will hold log_sys.latch in exclusive mode. This will create significant contention to other concurrent threads.
A better choice would be to preallocate a spare file while not holding any mutex. The most natural place for that could be the buf_flush_page_cleaner() thread.
Creating a file upfront might also allow more graceful handling of out-of-space scenarios. Currently, we intentionally crash the server if we fail to create a log file. If we preallocate a log file, in some cases under moderate write load there could be enough time to gracefully switch to read-only operation. Because this is tricky to test and implement, I would leave this out of the scope of the fix for now.
Attachments
Issue Links
- is caused by
-
MDEV-37949 Implement innodb_log_archive
-
- Approved
-