Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.11, 11.4, 11.8, 12.3
-
None
Description
PageStats::scan_below() starts a mini-transaction and takes an
RW_S_LATCH on every page it visits while descending from the mid
level to a leaf, releasing nothing until mtr.commit() at the end.
Both the latches and the buffer-fixes therefore accumulate for the whole dive.
The latches on the non-leaf pages are redundant: the caller already
holds dict_index_t::lock in U mode (mtr_sx_lock_index()), and any
thread modifying a non-leaf page must hold that lock in a
conflicting mode. The page latch only adds cost while ANALYZE
TABLE (or a background statistics recalculation) dives through the
tree, it blocks buf_flush_page_cleaner() from writing out those
dirty non-leaf pages, for no benefit.
Attachments
Issue Links
- relates to
-
MDEV-19574 innodb_stats_method is not honored when innodb_stats_persistent=ON
-
- Stalled
-
-
MDEV-40619 Unnecessary index latch contention in BTR_MODIFY_LEAF operations
-
- Open
-