Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6, 10.11, 11.4
Description
monty noted that the function purge_sys_t::close_and_reopen() may busy loop for a long time, depending on the workload. This might only be reproducible with the MDEV-25292 related changes that he was working on. The symptoms were that in a Valgrind Memcheck run when using the default scheduling options, a test would seem to hang after some 30 seconds, because purge_sys_t::close_and_reopen() would loop without yielding to another thread.
Completely avoiding this loop is tricky. The reason why the InnoDB purge subsystem acquires a metadata lock (MDL) is to prevent any race condition with a DDL operation that is running concurrently with the current purge batch.
The way how the undo log is structured and the multi-threaded purge (re)implemented in MDEV-32050 would not easily allow a purge batch to skip a particular table and to return to it later.
When it comes to evaluating the values of indexed virtual columns (MDEV-5800 until MDEV-17598 has been implemented), the MDL may be unavoidable. For preventing other cases of conflicts between purge and DDL, it might be possible to acquire a latch inside an InnoDB dict_table_t object.
Attachments
Issue Links
- relates to
-
MDEV-25292 Atomic CREATE OR REPLACE TABLE
-
- In Testing
-
-
MDEV-32050 UNDO logs still growing for write-intensive workloads
-
- Closed
-