diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-10-02 10:10:28 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2020-10-02 10:11:01 +0530 |
commit | e03ec500a3e547491bdf7613ae3bce2413f61a7d (patch) | |
tree | c54ab62099054e6e5c341257fd8337a432bbb518 | |
parent | bd64c2e8cc610dc774411c5f0a8ab163fc685934 (diff) | |
download | mariadb-git-bb-10.4-MDEV-21329.tar.gz |
MDEV-21329 InnoDB: Failing assertion: lock->lock_word.load(std::memory_order_relaxed) == X_LOCK_DECR upon server shutdownbb-10.4-MDEV-21329
Problem is that dropping of fts table and sync of fts table
happens concurrently during fts optimize thread shutdown.
fts_optimize_remove_table() doesn't remove the table from the queue
and it leads to above scenario. While removing the table from
fts_optimize_wq, if the table can't be removed then wait till
fts_optimize_thread shuts down.
-rw-r--r-- | storage/innobase/fts/fts0opt.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc index dcd613aa933..d0513643230 100644 --- a/storage/innobase/fts/fts0opt.cc +++ b/storage/innobase/fts/fts0opt.cc @@ -2574,6 +2574,11 @@ fts_optimize_remove_table( if (fts_opt_start_shutdown) { ib::info() << "Try to remove table " << table->name << " after FTS optimize thread exiting."; + /* If the table can't be removed then wait till + fts optimize thread shuts down */ + while (fts_optimize_wq) { + os_thread_sleep(10000); + } return; } |