summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-09-09 11:34:56 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-09-09 11:35:02 +0300
commit99e36a7157e9ea4506a8003ce6ec7a6df116849e (patch)
treec957de7e1b39478aedc880b5b4d1b97b66c40de4
parent980d1bf1a921a270423ab36bd5d1ce2a1cd7590b (diff)
downloadmariadb-git-99e36a7157e9ea4506a8003ce6ec7a6df116849e.tar.gz
Follow-up to MDEV-13407: Remove fil_wait_crypt_bg_threads()
Tables whose reference count is not zero will be crash-safely dropped in the background when the count reaches zero. Therefore, it is no longer necessary to wait for all references to be released before possibly adding the table to the background queue.
-rw-r--r--storage/innobase/row/row0mysql.cc34
1 files changed, 0 insertions, 34 deletions
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index d51c2539f3e..1460471b347 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -3240,37 +3240,6 @@ run_again:
return(err);
}
-static
-void
-fil_wait_crypt_bg_threads(
- dict_table_t* table)
-{
- time_t start = time(0);
- time_t last = start;
-
- while (table->get_ref_count()> 0) {
- dict_mutex_exit_for_mysql();
- os_thread_sleep(20000);
- dict_mutex_enter_for_mysql();
- time_t now = time(0);
-
- if (now >= last + 30) {
- ib::warn()
- << "Waited " << now - start
- << " seconds for ref-count on table: "
- << table->name << " space: " << table->space;
- last = now;
- }
- if (now >= start + 300) {
- ib::warn()
- << "After " << now - start
- << " seconds, gave up waiting "
- << "for ref-count on table: " << table->name
- << " space: " << table->space;
- break;
- }
- }
-}
/** Drop ancillary FTS tables as part of dropping a table.
@param[in,out] table Table cache entry
@param[in,out] trx Transaction handle
@@ -3647,9 +3616,6 @@ defer:
shouldn't have to. There should never be record locks on a table
that is going to be dropped. */
- /* Wait on background threads to stop using table */
- fil_wait_crypt_bg_threads(table);
-
if (table->get_ref_count() > 0 || table->n_rec_locks > 0
|| lock_table_has_locks(table)) {
goto defer;