diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-06-14 16:19:29 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-06-14 16:19:29 +0300 |
commit | 813986a6473b23485654d50d3593f1c9aa3658d8 (patch) | |
tree | 6d96eb570ee044c245e055713f366221775cfb39 /storage/innobase/fts/fts0opt.cc | |
parent | 62419b1733042c30414a4feed89c79aebb5621af (diff) | |
parent | 42d3a7b63d9313bffa91d4c6c5977fda42005d26 (diff) | |
download | mariadb-git-813986a6473b23485654d50d3593f1c9aa3658d8.tar.gz |
Merge 10.7 into 10.8
Diffstat (limited to 'storage/innobase/fts/fts0opt.cc')
-rw-r--r-- | storage/innobase/fts/fts0opt.cc | 56 |
1 files changed, 4 insertions, 52 deletions
diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc index 030dc438193..9cc56f184fd 100644 --- a/storage/innobase/fts/fts0opt.cc +++ b/storage/innobase/fts/fts0opt.cc @@ -83,9 +83,8 @@ enum fts_msg_type_t { FTS_MSG_ADD_TABLE, /*!< Add table to the optimize thread's work queue */ - FTS_MSG_DEL_TABLE, /*!< Remove a table from the optimize + FTS_MSG_DEL_TABLE /*!< Remove a table from the optimize threads work queue */ - FTS_MSG_SYNC_TABLE /*!< Sync fts cache of a table */ }; /** Compressed list of words that have been read from FTS INDEX @@ -2625,36 +2624,6 @@ fts_optimize_remove_table( mysql_mutex_unlock(&fts_optimize_wq->mutex); } -/** Send sync fts cache for the table. -@param[in] table table to sync */ -void -fts_optimize_request_sync_table( - dict_table_t* table) -{ - /* if the optimize system not yet initialized, return */ - if (!fts_optimize_wq) { - return; - } - - mysql_mutex_lock(&fts_optimize_wq->mutex); - - /* FTS optimizer thread is already exited */ - if (fts_opt_start_shutdown) { - ib::info() << "Try to sync table " << table->name - << " after FTS optimize thread exiting."; - } else if (table->fts->sync_message) { - /* If the table already has SYNC message in - fts_optimize_wq queue then ignore it */ - } else { - add_msg(fts_optimize_create_msg(FTS_MSG_SYNC_TABLE, table)); - table->fts->sync_message = true; - DBUG_EXECUTE_IF("fts_optimize_wq_count_check", - DBUG_ASSERT(fts_optimize_wq->length <= 1000);); - } - - mysql_mutex_unlock(&fts_optimize_wq->mutex); -} - /** Add a table to fts_slots if it doesn't already exist. */ static bool fts_optimize_new_table(dict_table_t* table) { @@ -2796,7 +2765,8 @@ static void fts_optimize_sync_table(dict_table_t *table, if (sync_table->fts && sync_table->fts->cache && sync_table->is_accessible()) { - fts_sync_table(sync_table, false); + fts_sync_table(sync_table); + if (process_message) { mysql_mutex_lock(&fts_optimize_wq->mutex); @@ -2896,24 +2866,6 @@ retry_later: --n_tables; } break; - - case FTS_MSG_SYNC_TABLE: - if (UNIV_UNLIKELY(wsrep_sst_disable_writes)) { - add_msg(msg); - goto retry_later; - } - - DBUG_EXECUTE_IF( - "fts_instrument_msg_sync_sleep", - std::this_thread::sleep_for( - std::chrono::milliseconds( - 300));); - - fts_optimize_sync_table( - static_cast<dict_table_t*>(msg->ptr), - true); - break; - default: ut_error; } @@ -3046,7 +2998,7 @@ void fts_sync_during_ddl(dict_table_t* table) if (!sync_message) return; - fts_sync_table(table, false); + fts_sync_table(table); mysql_mutex_lock(&fts_optimize_wq->mutex); table->fts->sync_message = false; |