Commit 48b974b2 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-27026 innodb_fts.concurrent_insert failed

Most of this was likely already fixed by MDEV-27017.
On one implementation of the AMD64 ISA, the test
innodb_fts.concurrent_insert would still occasionally hang,
with both dict_sys_t::evict_table_LRU() and
dict_index_set_merge_threshold() waiting in dict_sys_t::lock()
several threads waiting in dict_sys_t::freeze(),
no thread holding exclusive dict_sys.latch and also no thread
in the stack traces apparently holding any dict_sys.latch,
even though dict_sys.latch_readers == 1.

To prevent this scenario, we will remove the dict_sys.latch
acquisition from dict_index_set_merge_threshold(). It is actually
not needed, because dict_sys.sys_indexes will not change after
InnoDB startup. The SYS_INDEXES leaf page will be sufficiently
protected by the page latch.

There potentially is a bug in the srw_lock implementation,
which will have to be investigated further.
parent b09a7443
......@@ -2,7 +2,7 @@
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2013, 2021, MariaDB Corporation.
Copyright (c) 2013, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -4259,8 +4259,6 @@ dict_index_set_merge_threshold(
mtr.start();
dict_sys.lock(SRW_LOCK_CALL);
sys_index = UT_LIST_GET_FIRST(dict_sys.sys_indexes->indexes);
/* Find the index row in SYS_INDEXES */
......@@ -4296,8 +4294,6 @@ dict_index_set_merge_threshold(
mtr_commit(&mtr);
mem_heap_free(heap);
dict_sys.unlock();
}
#ifdef UNIV_DEBUG
......
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