Commit 46904424 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-24258 fixup: Throttle purge with exclusive dict_sys.latch

A performance regression was observed after
commit 82b7c561
because purge tasks would end up waiting more elsewhere,
most notably trx_purge_get_next_rec() and trx_purge_truncate_history().

row_purge_parse_undo_rec(): Prevent the performance regression by
unnecessarily acquiring dict_sys.latch in exclusive mode after the
table lookup.
parent ee39757f
......@@ -1038,6 +1038,12 @@ row_purge_parse_undo_rec(
goto err_exit;
}
/* FIXME: We are acquiring exclusive dict_sys.latch only to
avoid increased wait times in
trx_purge_get_next_rec() and trx_purge_truncate_history(). */
dict_sys.lock(SRW_LOCK_CALL);
dict_sys.unlock();
already_locked:
ut_ad(!node->table->is_temporary());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment