Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.11.8
-
Debian Bookworm
Description
The following stack trace had to wait on dict_sys.latch:
ssux_lock_impl<false>::rd_wait()
|
dict_table_open_on_name(char const*, bool, dict_err_ignore_t)
|
dict_stats_update(dict_table_t*, dict_stats_upd_option_t)
|
ha_innobase::info_low(unsigned int, bool)
|
ha_innobase::open(char const*, int, unsigned int)
|
handler::ha_open(TABLE*, char const*, int, unsigned int, st_mem_root*, List<String>*)
|
(According to Marko Mäkelä: ) This one is an InnoDB bug. We certainly should not acquire and release a shared dict_sys.latch within a single ha_innobase::open().
Attachments
Issue Links
- blocks
-
MDEV-34986 Use RAII classes to manage locks
-
- In Review
-
- relates to
-
MDEV-35000 dict_table_close() breaks innodb_stats_auto_recalc
-
- Closed
-
-
MDEV-35154 dict_sys_t::load_table() is holding exclusive dict_sys.latch for unnecessarily long time
-
- Confirmed
-
-
MDEV-35436 dict_stats_fetch_from_ps() unnecessarily holds exclusive dict_sys.latch
-
- Closed
-
-
MDEV-34988 InnoDB locks dict_sys.latch for a long time during ALTER TABLE
-
- Open
-
My point was that one dict_sys.latch acquisition earlier during ha_innobase::open() is unavoidable.
The acquisition in dict_stats_update() could be entirely redundant, because the callers from the SQL layer should be holding a metadata lock and a reference count on the table. Also the background task that executes dict_stats_process_entry_from_recalc_pool() will acquire both a metadata lock and a reference on the table that it is processing.