Details
-
Bug
-
Status: Stalled (View Workflow)
-
Major
-
Resolution: Unresolved
-
12.3.2
-
Related to performance
-
Q3/2026 Server Maintenance, Q3/2026 Server Development
Description
btr_page_reorganize_low() (and page_zip_reorganize()) needs a scratch/temporary block to perform the page reorganization (to compact the records in a page).
Currently, this block is allocated from the buffer pool and freed at the end of the function.
This means that the function needs to obtain at least twice the buffer pool mutex to do so.
In addition, any wait for buffer pool mutex here would be done while holding the page X-latch, further delaying at least any queued reader of the same page.
Scratch blocks could be carved out of another storage, which I called btr_scratch_pool_t in one experimental commit, that has its own synchronization mechanisms and allow to not pollute the main buffer pool mutex for scratch blocks handling.
Only users (threads) of the new storage would collide with each other.
Attachments
Issue Links
- relates to
-
MDEV-39425 Potential hang in the recovery of ROW_FORMAT=COMPRESSED tables
-
- Confirmed
-
-
MDEV-40128 lock_move_reorganize_page() takes exclusive lock_sys.latch via LockMutexGuard
-
- Closed
-
-
PERF-475 Loading...