summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya A <aditya.a@oracle.com>2021-02-24 07:49:37 +0530
committerMarko Mäkelä <marko.makela@mariadb.com>2021-04-20 17:31:35 +0300
commit72432ec7b3e6c4d87d86fcd00acdff1c03f402d2 (patch)
tree2b9e9bf2d0103c5c27bc33679d0094f5a3fa0f5e
parent635b5ce355473167af64e116e403a51bfaed184b (diff)
downloadmariadb-git-72432ec7b3e6c4d87d86fcd00acdff1c03f402d2.tar.gz
Bug #32032897 DEADLOCKING WAIT GRAPH ON BUSY SERVER
PROBLEM ------- 1. The customer had presented a stack which had many threads waiting on multiple mutexes like LOCK_Status, srv_innodb_monitor_mutex, ibuf_mutex etc. 2. The root cause was that the AHI latch was held in S (shared) mode by the a thread which was doing a truncate of a large table . 3. There was another thread which was trying to acquire the AHI latch in X (exclusive) mode 4. With our lock implementation any thread requesting a X lock ,blocks rest of the threads requesting S(shared) locks,this caused many threads to wait for this shared lock. 5. The main reason why we hold the latches in truncate is to avoid disabling of AHI during truncate FIX
-rw-r--r--storage/innobase/fil/fil0fil.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
index 659cfa26033..39e7507373f 100644
--- a/storage/innobase/fil/fil0fil.cc
+++ b/storage/innobase/fil/fil0fil.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2021, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2014, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -3137,11 +3137,7 @@ fil_reinit_space_header_for_table(
row_mysql_unlock_data_dictionary(trx);
DEBUG_SYNC_C("buffer_pool_scan");
- /* Lock the search latch in shared mode to prevent user
- from disabling AHI during the scan */
- btr_search_s_lock_all();
buf_LRU_flush_or_remove_pages(id, NULL);
- btr_search_s_unlock_all();
row_mysql_lock_data_dictionary(trx);