diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-09 11:22:32 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-24 15:43:12 +0200 |
commit | bdd88cfa348b1a5257b1ae8f6231e6a2fcb6d30f (patch) | |
tree | fb83dd252c0643dfd281fa01765033f67fa41f22 /storage | |
parent | 1a1b7a6f16c44239655aa8785647f686730e7632 (diff) | |
download | mariadb-git-bdd88cfa348b1a5257b1ae8f6231e6a2fcb6d30f.tar.gz |
MDEV-24167: Replace fts_cache_rw_lock, fts_cache_init_rw_lock with mutex
fts_cache_t::init_lock: Replace with mutex. This was only acquired
in exclusive mode.
fts_cache_t::lock: Replace with mutex. The only read-lock user was
i_s_fts_index_cache_fill() for producing content for the view
INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/dict/dict0crea.cc | 4 | ||||
-rw-r--r-- | storage/innobase/dict/dict0dict.cc | 4 | ||||
-rw-r--r-- | storage/innobase/fts/fts0fts.cc | 102 | ||||
-rw-r--r-- | storage/innobase/fts/fts0que.cc | 24 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 4 | ||||
-rw-r--r-- | storage/innobase/handler/i_s.cc | 4 | ||||
-rw-r--r-- | storage/innobase/include/fts0fts.h | 7 | ||||
-rw-r--r-- | storage/innobase/include/fts0types.h | 11 | ||||
-rw-r--r-- | storage/innobase/include/log0log.ic | 1 | ||||
-rw-r--r-- | storage/innobase/include/sync0sync.h | 4 | ||||
-rw-r--r-- | storage/innobase/include/sync0types.h | 5 | ||||
-rw-r--r-- | storage/innobase/sync/sync0debug.cc | 9 | ||||
-rw-r--r-- | storage/innobase/sync/sync0sync.cc | 4 |
13 files changed, 77 insertions, 106 deletions
diff --git a/storage/innobase/dict/dict0crea.cc b/storage/innobase/dict/dict0crea.cc index ea7bad3e9f0..a57d06d127a 100644 --- a/storage/innobase/dict/dict0crea.cc +++ b/storage/innobase/dict/dict0crea.cc @@ -1281,7 +1281,7 @@ dict_create_index_step( && node->table->fts) { fts_index_cache_t* index_cache; - rw_lock_x_lock( + mysql_mutex_lock( &node->table->fts->cache->init_lock); index_cache = (fts_index_cache_t*) @@ -1298,7 +1298,7 @@ dict_create_index_step( node->table->fts->cache->indexes, *reinterpret_cast<void**>(index_cache)); - rw_lock_x_unlock( + mysql_mutex_unlock( &node->table->fts->cache->init_lock); } diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index f06127f0fb8..4c32c039e1f 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -2803,10 +2803,10 @@ dict_index_build_internal_fts( table->fts->cache = fts_cache_create(table); } - rw_lock_x_lock(&table->fts->cache->init_lock); + mysql_mutex_lock(&table->fts->cache->init_lock); /* Notify the FTS cache about this index. */ fts_cache_index_cache_create(table, new_index); - rw_lock_x_unlock(&table->fts->cache->init_lock); + mysql_mutex_unlock(&table->fts->cache->init_lock); return(new_index); } diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index a5945fea791..e8664daadbc 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -284,8 +284,8 @@ static void fts_cache_destroy(fts_cache_t* cache) { - rw_lock_free(&cache->lock); - rw_lock_free(&cache->init_lock); + mysql_mutex_destroy(&cache->lock); + mysql_mutex_destroy(&cache->init_lock); mutex_free(&cache->deleted_lock); mutex_free(&cache->doc_id_lock); os_event_destroy(cache->sync->event); @@ -613,11 +613,8 @@ fts_cache_create( cache->cache_heap = heap; - rw_lock_create(fts_cache_rw_lock_key, &cache->lock, SYNC_FTS_CACHE); - - rw_lock_create( - fts_cache_init_rw_lock_key, &cache->init_lock, - SYNC_FTS_CACHE_INIT); + mysql_mutex_init(fts_cache_mutex_key, &cache->lock, nullptr); + mysql_mutex_init(fts_cache_init_mutex_key, &cache->init_lock, nullptr); mutex_create(LATCH_ID_FTS_DELETE, &cache->deleted_lock); @@ -667,7 +664,7 @@ fts_add_index( ut_ad(fts); cache = table->fts->cache; - rw_lock_x_lock(&cache->init_lock); + mysql_mutex_lock(&cache->init_lock); ib_vector_push(fts->indexes, &index); @@ -678,7 +675,7 @@ fts_add_index( index_cache = fts_cache_index_cache_create(table, index); } - rw_lock_x_unlock(&cache->init_lock); + mysql_mutex_unlock(&cache->init_lock); } /*******************************************************************//** @@ -692,7 +689,7 @@ fts_reset_get_doc( fts_get_doc_t* get_doc; ulint i; - ut_ad(rw_lock_own(&cache->init_lock, RW_LOCK_X)); + mysql_mutex_assert_owner(&cache->init_lock); ib_vector_reset(cache->get_docs); @@ -860,7 +857,7 @@ fts_drop_index( fts_cache_t* cache = table->fts->cache; fts_index_cache_t* index_cache; - rw_lock_x_lock(&cache->init_lock); + mysql_mutex_lock(&cache->init_lock); index_cache = fts_find_index_cache(cache, index); @@ -877,7 +874,7 @@ fts_drop_index( fts_reset_get_doc(cache); } - rw_lock_x_unlock(&cache->init_lock); + mysql_mutex_unlock(&cache->init_lock); } err = fts_drop_index_tables(trx, index); @@ -976,7 +973,7 @@ fts_cache_index_cache_create( ut_a(cache != NULL); - ut_ad(rw_lock_own(&cache->init_lock, RW_LOCK_X)); + mysql_mutex_assert_owner(&cache->init_lock); /* Must not already exist in the cache vector. */ ut_a(fts_find_index_cache(cache, index) == NULL); @@ -1111,12 +1108,12 @@ fts_get_index_cache( fts_cache_t* cache, /*!< in: cache to search */ const dict_index_t* index) /*!< in: index to search for */ { - ulint i; - - ut_ad(rw_lock_own((rw_lock_t*) &cache->lock, RW_LOCK_X) - || rw_lock_own((rw_lock_t*) &cache->init_lock, RW_LOCK_X)); +#ifdef SAFE_MUTEX + ut_ad(mysql_mutex_is_owner(&cache->lock) + || mysql_mutex_is_owner(&cache->init_lock)); +#endif /* SAFE_MUTEX */ - for (i = 0; i < ib_vector_size(cache->indexes); ++i) { + for (ulint i = 0; i < ib_vector_size(cache->indexes); ++i) { fts_index_cache_t* index_cache; index_cache = static_cast<fts_index_cache_t*>( @@ -1144,7 +1141,7 @@ fts_get_index_get_doc( { ulint i; - ut_ad(rw_lock_own((rw_lock_t*) &cache->init_lock, RW_LOCK_X)); + mysql_mutex_assert_owner(&cache->init_lock); for (i = 0; i < ib_vector_size(cache->get_docs); ++i) { fts_get_doc_t* get_doc; @@ -1177,7 +1174,7 @@ fts_tokenizer_word_get( fts_tokenizer_word_t* word; ib_rbt_bound_t parent; - ut_ad(rw_lock_own(&cache->lock, RW_LOCK_X)); + mysql_mutex_assert_owner(&cache->lock); /* If it is a stopword, do not index it */ if (!fts_check_token(text, @@ -1237,7 +1234,7 @@ fts_cache_node_add_positions( #ifdef UNIV_DEBUG if (cache) { - ut_ad(rw_lock_own(&cache->lock, RW_LOCK_X)); + mysql_mutex_assert_owner(&cache->lock); } #endif /* UNIV_DEBUG */ @@ -1350,7 +1347,7 @@ fts_cache_add_doc( return; } - ut_ad(rw_lock_own(&cache->lock, RW_LOCK_X)); + mysql_mutex_assert_owner(&cache->lock); n_words = rbt_size(tokens); @@ -2959,11 +2956,11 @@ fts_commit_table( ftt->fts_trx->trx = trx; if (cache->get_docs == NULL) { - rw_lock_x_lock(&cache->init_lock); + mysql_mutex_lock(&cache->init_lock); if (cache->get_docs == NULL) { cache->get_docs = fts_get_docs_create(cache); } - rw_lock_x_unlock(&cache->init_lock); + mysql_mutex_unlock(&cache->init_lock); } for (node = rbt_first(rows); @@ -3328,7 +3325,7 @@ fts_add_doc_from_tuple( if (doc.found) { mtr_commit(&mtr); - rw_lock_x_lock(&table->fts->cache->lock); + mysql_mutex_lock(&table->fts->cache->lock); if (table->fts->cache->stopword_info.status & STOPWORD_NOT_INIT) { @@ -3341,7 +3338,7 @@ fts_add_doc_from_tuple( get_doc->index_cache, doc_id, doc.tokens); - rw_lock_x_unlock(&table->fts->cache->lock); + mysql_mutex_unlock(&table->fts->cache->lock); if (cache->total_size > fts_max_cache_size / 5 || fts_need_sync) { @@ -3493,7 +3490,7 @@ fts_add_doc_by_id( btr_pcur_store_position(doc_pcur, &mtr); mtr_commit(&mtr); - rw_lock_x_lock(&table->fts->cache->lock); + mysql_mutex_lock(&table->fts->cache->lock); if (table->fts->cache->stopword_info.status & STOPWORD_NOT_INIT) { @@ -3513,7 +3510,7 @@ fts_add_doc_by_id( need_sync = true; } - rw_lock_x_unlock(&table->fts->cache->lock); + mysql_mutex_unlock(&table->fts->cache->lock); DBUG_EXECUTE_IF( "fts_instrument_sync", @@ -3955,7 +3952,7 @@ fts_sync_write_words( /*FIXME: we need to handle the error properly. */ if (error == DB_SUCCESS) { if (unlock_cache) { - rw_lock_x_unlock( + mysql_mutex_unlock( &table->fts->cache->lock); } @@ -3973,7 +3970,7 @@ fts_sync_write_words( ); if (unlock_cache) { - rw_lock_x_lock( + mysql_mutex_lock( &table->fts->cache->lock); } } @@ -4132,7 +4129,7 @@ fts_sync_commit( fts_cache_clear(cache); DEBUG_SYNC_C("fts_deleted_doc_ids_clear"); fts_cache_init(cache); - rw_lock_x_unlock(&cache->lock); + mysql_mutex_unlock(&cache->lock); if (UNIV_LIKELY(error == DB_SUCCESS)) { fts_sql_commit(trx); @@ -4201,7 +4198,7 @@ fts_sync_rollback( } } - rw_lock_x_unlock(&cache->lock); + mysql_mutex_unlock(&cache->lock); fts_sql_rollback(trx); @@ -4231,13 +4228,13 @@ fts_sync( dberr_t error = DB_SUCCESS; fts_cache_t* cache = sync->table->fts->cache; - rw_lock_x_lock(&cache->lock); + mysql_mutex_lock(&cache->lock); /* Check if cache is being synced. Note: we release cache lock in fts_sync_write_words() to avoid long wait for the lock by other threads. */ while (sync->in_progress) { - rw_lock_x_unlock(&cache->lock); + mysql_mutex_unlock(&cache->lock); if (wait) { os_event_wait(sync->event); @@ -4245,7 +4242,7 @@ fts_sync( return(DB_SUCCESS); } - rw_lock_x_lock(&cache->lock); + mysql_mutex_lock(&cache->lock); } sync->unlock_cache = unlock_cache; @@ -4311,12 +4308,12 @@ end_sync: fts_sync_rollback(sync); } - rw_lock_x_lock(&cache->lock); + mysql_mutex_lock(&cache->lock); sync->interrupted = false; sync->in_progress = false; os_event_set(sync->event); - rw_lock_x_unlock(&cache->lock); + mysql_mutex_unlock(&cache->lock); /* We need to check whether an optimize is required, for that we make copies of the two variables that control the trigger. These @@ -4711,7 +4708,7 @@ fts_get_docs_create( { ib_vector_t* get_docs; - ut_ad(rw_lock_own(&cache->init_lock, RW_LOCK_X)); + mysql_mutex_assert_owner(&cache->init_lock); /* We need one instance of fts_get_doc_t per index. */ get_docs = ib_vector_create(cache->self_heap, sizeof(fts_get_doc_t), 4); @@ -4777,11 +4774,11 @@ fts_init_doc_id( { doc_id_t max_doc_id = 0; - rw_lock_x_lock(&table->fts->cache->lock); + mysql_mutex_lock(&table->fts->cache->lock); /* Return if the table is already initialized for DOC ID */ if (table->fts->cache->first_doc_id != FTS_NULL_DOC_ID) { - rw_lock_x_unlock(&table->fts->cache->lock); + mysql_mutex_unlock(&table->fts->cache->lock); return(0); } @@ -4802,7 +4799,7 @@ fts_init_doc_id( table->fts->cache->first_doc_id = max_doc_id; - rw_lock_x_unlock(&table->fts->cache->lock); + mysql_mutex_unlock(&table->fts->cache->lock); ut_ad(max_doc_id > 0); @@ -5134,12 +5131,8 @@ fts_cache_find_word( { ib_rbt_bound_t parent; const ib_vector_t* nodes = NULL; -#ifdef UNIV_DEBUG - dict_table_t* table = index_cache->index->table; - fts_cache_t* cache = table->fts->cache; - ut_ad(rw_lock_own(&cache->lock, RW_LOCK_X)); -#endif /* UNIV_DEBUG */ + mysql_mutex_assert_owner(&index_cache->index->table->fts->cache->lock); /* Lookup the word in the rb tree */ if (rbt_search(index_cache->words, &parent, text) == 0) { @@ -6206,13 +6199,12 @@ fts_init_recover_doc( This function brings FTS index in sync when FTS index is first used. There are documents that have not yet sync-ed to auxiliary tables from last server abnormally shutdown, we will need to bring -such document into FTS cache before any further operations -@return TRUE if all OK */ -ibool +such document into FTS cache before any further operations */ +void fts_init_index( /*===========*/ dict_table_t* table, /*!< in: Table with FTS */ - ibool has_cache_lock) /*!< in: Whether we already have + bool has_cache_lock) /*!< in: Whether we already have cache lock */ { dict_index_t* index; @@ -6225,14 +6217,14 @@ fts_init_index( /* First check cache->get_docs is initialized */ if (!has_cache_lock) { - rw_lock_x_lock(&cache->lock); + mysql_mutex_lock(&cache->lock); } - rw_lock_x_lock(&cache->init_lock); + mysql_mutex_lock(&cache->init_lock); if (cache->get_docs == NULL) { cache->get_docs = fts_get_docs_create(cache); } - rw_lock_x_unlock(&cache->init_lock); + mysql_mutex_unlock(&cache->init_lock); if (table->fts->added_synced) { goto func_exit; @@ -6282,7 +6274,7 @@ fts_init_index( func_exit: if (!has_cache_lock) { - rw_lock_x_unlock(&cache->lock); + mysql_mutex_unlock(&cache->lock); } if (need_init) { @@ -6291,8 +6283,6 @@ func_exit: fts_optimize_add_table(table); mutex_exit(&dict_sys.mutex); } - - return(TRUE); } /** Check if the all the auxillary tables associated with FTS index are in diff --git a/storage/innobase/fts/fts0que.cc b/storage/innobase/fts/fts0que.cc index 8e2cb838e5a..d8b5ab6b904 100644 --- a/storage/innobase/fts/fts0que.cc +++ b/storage/innobase/fts/fts0que.cc @@ -1145,7 +1145,7 @@ fts_query_difference( fts_cache_t* cache = table->fts->cache; dberr_t error; - rw_lock_x_lock(&cache->lock); + mysql_mutex_lock(&cache->lock); index_cache = fts_find_index_cache(cache, query->index); @@ -1171,7 +1171,7 @@ fts_query_difference( } } - rw_lock_x_unlock(&cache->lock); + mysql_mutex_unlock(&cache->lock); /* error is passed by 'query->error' */ if (query->error != DB_SUCCESS) { @@ -1270,7 +1270,7 @@ fts_query_intersect( /* Search the cache for a matching word first. */ - rw_lock_x_lock(&cache->lock); + mysql_mutex_lock(&cache->lock); /* Search for the index specific cache. */ index_cache = fts_find_index_cache(cache, query->index); @@ -1295,7 +1295,7 @@ fts_query_intersect( } } - rw_lock_x_unlock(&cache->lock); + mysql_mutex_unlock(&cache->lock); /* error is passed by 'query->error' */ if (query->error != DB_SUCCESS) { @@ -1349,7 +1349,7 @@ fts_query_cache( fts_cache_t* cache = table->fts->cache; /* Search the cache for a matching word first. */ - rw_lock_x_lock(&cache->lock); + mysql_mutex_lock(&cache->lock); /* Search for the index specific cache. */ index_cache = fts_find_index_cache(cache, query->index); @@ -1379,7 +1379,7 @@ fts_query_cache( } } - rw_lock_x_unlock(&cache->lock); + mysql_mutex_unlock(&cache->lock); return(query->error); } @@ -2480,9 +2480,9 @@ fts_query_is_in_proximity_range( memset(&get_doc, 0x0, sizeof(get_doc)); - rw_lock_x_lock(&cache->lock); + mysql_mutex_lock(&cache->lock); get_doc.index_cache = fts_find_index_cache(cache, query->index); - rw_lock_x_unlock(&cache->lock); + mysql_mutex_unlock(&cache->lock); ut_a(get_doc.index_cache != NULL); fts_phrase_t phrase(get_doc.index_cache->index->table); @@ -2540,14 +2540,14 @@ fts_query_search_phrase( /* Setup the doc retrieval infrastructure. */ memset(&get_doc, 0x0, sizeof(get_doc)); - rw_lock_x_lock(&cache->lock); + mysql_mutex_lock(&cache->lock); get_doc.index_cache = fts_find_index_cache(cache, query->index); /* Must find the index cache */ ut_a(get_doc.index_cache != NULL); - rw_lock_x_unlock(&cache->lock); + mysql_mutex_unlock(&cache->lock); #ifdef FTS_INTERNAL_DIAG_PRINT ib::info() << "Start phrase search"; @@ -4255,9 +4255,9 @@ fts_expand_query( /* Init "result_doc", to hold words from the first search pass */ fts_doc_init(&result_doc); - rw_lock_x_lock(&index->table->fts->cache->lock); + mysql_mutex_lock(&index->table->fts->cache->lock); index_cache = fts_find_index_cache(index->table->fts->cache, index); - rw_lock_x_unlock(&index->table->fts->cache->lock); + mysql_mutex_unlock(&index->table->fts->cache->lock); ut_a(index_cache); diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 49d56f5048b..0eb86cc9c07 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -522,6 +522,8 @@ static PSI_mutex_info all_innodb_mutexes[] = { PSI_KEY(recalc_pool_mutex), PSI_KEY(fil_system_mutex), PSI_KEY(flush_list_mutex), + PSI_KEY(fts_cache_mutex), + PSI_KEY(fts_cache_init_mutex), PSI_KEY(fts_delete_mutex), PSI_KEY(fts_doc_id_mutex), PSI_KEY(log_flush_order_mutex), @@ -566,8 +568,6 @@ static PSI_rwlock_info all_innodb_rwlocks[] = { # endif { &dict_operation_lock_key, "dict_operation_lock", 0 }, PSI_RWLOCK_KEY(fil_space_latch), - PSI_RWLOCK_KEY(fts_cache_rw_lock), - PSI_RWLOCK_KEY(fts_cache_init_rw_lock), { &trx_i_s_cache_lock_key, "trx_i_s_cache_lock", 0 }, { &trx_purge_latch_key, "trx_purge_latch", 0 }, PSI_RWLOCK_KEY(index_tree_rw_lock), diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc index 80a4099418c..9d347738388 100644 --- a/storage/innobase/handler/i_s.cc +++ b/storage/innobase/handler/i_s.cc @@ -2817,7 +2817,7 @@ no_fts: conv_str.f_len = sizeof word; conv_str.f_str = word; - rw_lock_s_lock(&cache->lock); + mysql_mutex_lock(&cache->lock); for (ulint i = 0; i < ib_vector_size(cache->indexes); i++) { fts_index_cache_t* index_cache; @@ -2829,7 +2829,7 @@ no_fts: index_cache, thd, &conv_str, tables)); } - rw_lock_s_unlock(&cache->lock); + mysql_mutex_unlock(&cache->lock); dict_table_close(user_table, FALSE, FALSE); dict_sys.unfreeze(); diff --git a/storage/innobase/include/fts0fts.h b/storage/innobase/include/fts0fts.h index 5e0381ccd56..77649aa55ab 100644 --- a/storage/innobase/include/fts0fts.h +++ b/storage/innobase/include/fts0fts.h @@ -887,13 +887,12 @@ fts_table_fetch_doc_ids( This function brings FTS index in sync when FTS index is first used. There are documents that have not yet sync-ed to auxiliary tables from last server abnormally shutdown, we will need to bring -such document into FTS cache before any further operations -@return TRUE if all OK */ -ibool +such document into FTS cache before any further operations */ +void fts_init_index( /*===========*/ dict_table_t* table, /*!< in: Table with FTS */ - ibool has_cache_lock); /*!< in: Whether we already + bool has_cache_lock); /*!< in: Whether we already have cache lock */ /*******************************************************************//** Add a newly create index in FTS cache */ diff --git a/storage/innobase/include/fts0types.h b/storage/innobase/include/fts0types.h index f5760a16c0e..91826f071a5 100644 --- a/storage/innobase/include/fts0types.h +++ b/storage/innobase/include/fts0types.h @@ -123,13 +123,10 @@ struct fts_sync_t { that new entries are added to, until it grows over the configured maximum size, at which time its contents are written to the INDEX table. */ struct fts_cache_t { - rw_lock_t lock; /*!< lock protecting all access to the - memory buffer. FIXME: this needs to - be our new upgrade-capable rw-lock */ - - rw_lock_t init_lock; /*!< lock used for the cache - intialization, it has different - SYNC level as above cache lock */ + mysql_mutex_t lock; /*!< lock protecting all access to the + memory buffer */ + mysql_mutex_t init_lock; /*!< lock used for the cache + intialization */ ib_mutex_t deleted_lock; /*!< Lock covering deleted_doc_ids */ diff --git a/storage/innobase/include/log0log.ic b/storage/innobase/include/log0log.ic index 3af021ee9df..36b16652e4e 100644 --- a/storage/innobase/include/log0log.ic +++ b/storage/innobase/include/log0log.ic @@ -308,7 +308,6 @@ log_free_check(void) static const latch_level_t latches[] = { SYNC_DICT, /* dict_sys.mutex during commit_try_rebuild() */ - SYNC_FTS_CACHE, /* fts_cache_t::lock */ SYNC_INDEX_TREE /* index->lock */ }; #endif /* UNIV_DEBUG */ diff --git a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h index 4ba3ceb437c..5c1d0a5f199 100644 --- a/storage/innobase/include/sync0sync.h +++ b/storage/innobase/include/sync0sync.h @@ -44,6 +44,8 @@ extern mysql_pfs_key_t dict_foreign_err_mutex_key; extern mysql_pfs_key_t dict_sys_mutex_key; extern mysql_pfs_key_t fil_system_mutex_key; extern mysql_pfs_key_t flush_list_mutex_key; +extern mysql_pfs_key_t fts_cache_mutex_key; +extern mysql_pfs_key_t fts_cache_init_mutex_key; extern mysql_pfs_key_t fts_delete_mutex_key; extern mysql_pfs_key_t fts_doc_id_mutex_key; extern mysql_pfs_key_t fts_pll_tokenize_mutex_key; @@ -89,8 +91,6 @@ extern mysql_pfs_key_t read_view_mutex_key; performance schema */ extern mysql_pfs_key_t dict_operation_lock_key; extern mysql_pfs_key_t fil_space_latch_key; -extern mysql_pfs_key_t fts_cache_rw_lock_key; -extern mysql_pfs_key_t fts_cache_init_rw_lock_key; extern mysql_pfs_key_t trx_i_s_cache_lock_key; extern mysql_pfs_key_t trx_purge_latch_key; extern mysql_pfs_key_t index_tree_rw_lock_key; diff --git a/storage/innobase/include/sync0types.h b/storage/innobase/include/sync0types.h index b1fa2c52ca2..c478a9e957c 100644 --- a/storage/innobase/include/sync0types.h +++ b/storage/innobase/include/sync0types.h @@ -195,7 +195,6 @@ enum latch_level_t { SYNC_FTS_TOKENIZE, SYNC_FTS_OPTIMIZE, - SYNC_FTS_CACHE_INIT, SYNC_RECV, SYNC_PURGE_QUEUE, SYNC_TRX_SYS_HEADER, @@ -234,7 +233,6 @@ enum latch_level_t { SYNC_DICT_HEADER, SYNC_STATS_AUTO_RECALC, SYNC_DICT, - SYNC_FTS_CACHE, /** Level is varying. Only used with buffer pool page locks, which do not have a fixed level, but instead have their level set after @@ -290,8 +288,6 @@ enum latch_id_t { LATCH_ID_BUF_BLOCK_LOCK, LATCH_ID_BUF_BLOCK_DEBUG, LATCH_ID_FIL_SPACE, - LATCH_ID_FTS_CACHE, - LATCH_ID_FTS_CACHE_INIT, LATCH_ID_IBUF_INDEX_TREE, LATCH_ID_INDEX_TREE, LATCH_ID_DICT_TABLE_STATS, @@ -957,7 +953,6 @@ struct sync_checker : public sync_check_functor_t switch (level) { case SYNC_FSP: case SYNC_DICT: - case SYNC_FTS_CACHE: case SYNC_NO_ORDER_CHECK: return(false); default: diff --git a/storage/innobase/sync/sync0debug.cc b/storage/innobase/sync/sync0debug.cc index d1316196e1a..2205d8eae5b 100644 --- a/storage/innobase/sync/sync0debug.cc +++ b/storage/innobase/sync/sync0debug.cc @@ -458,7 +458,6 @@ LatchDebug::LatchDebug() LEVEL_MAP_INSERT(SYNC_WORK_QUEUE); LEVEL_MAP_INSERT(SYNC_FTS_TOKENIZE); LEVEL_MAP_INSERT(SYNC_FTS_OPTIMIZE); - LEVEL_MAP_INSERT(SYNC_FTS_CACHE_INIT); LEVEL_MAP_INSERT(SYNC_RECV); LEVEL_MAP_INSERT(SYNC_PURGE_QUEUE); LEVEL_MAP_INSERT(SYNC_TRX_SYS_HEADER); @@ -492,7 +491,6 @@ LatchDebug::LatchDebug() LEVEL_MAP_INSERT(SYNC_DICT_HEADER); LEVEL_MAP_INSERT(SYNC_STATS_AUTO_RECALC); LEVEL_MAP_INSERT(SYNC_DICT); - LEVEL_MAP_INSERT(SYNC_FTS_CACHE); LEVEL_MAP_INSERT(SYNC_LEVEL_VARYING); LEVEL_MAP_INSERT(SYNC_NO_ORDER_CHECK); @@ -726,8 +724,6 @@ LatchDebug::check_order( case SYNC_WORK_QUEUE: case SYNC_FTS_TOKENIZE: case SYNC_FTS_OPTIMIZE: - case SYNC_FTS_CACHE: - case SYNC_FTS_CACHE_INIT: case SYNC_LOCK_SYS: case SYNC_LOCK_WAIT_SYS: case SYNC_RW_TRX_HASH_ELEMENT: @@ -1305,11 +1301,6 @@ sync_latch_meta_init() LATCH_ADD_RWLOCK(FIL_SPACE, SYNC_FSP, fil_space_latch_key); - LATCH_ADD_RWLOCK(FTS_CACHE, SYNC_FTS_CACHE, fts_cache_rw_lock_key); - - LATCH_ADD_RWLOCK(FTS_CACHE_INIT, SYNC_FTS_CACHE_INIT, - fts_cache_init_rw_lock_key); - LATCH_ADD_RWLOCK(IBUF_INDEX_TREE, SYNC_IBUF_INDEX_TREE, index_tree_rw_lock_key); diff --git a/storage/innobase/sync/sync0sync.cc b/storage/innobase/sync/sync0sync.cc index 8ee9ffd2947..cbe6b11e285 100644 --- a/storage/innobase/sync/sync0sync.cc +++ b/storage/innobase/sync/sync0sync.cc @@ -41,6 +41,8 @@ mysql_pfs_key_t dict_foreign_err_mutex_key; mysql_pfs_key_t dict_sys_mutex_key; mysql_pfs_key_t fil_system_mutex_key; mysql_pfs_key_t flush_list_mutex_key; +mysql_pfs_key_t fts_cache_mutex_key; +mysql_pfs_key_t fts_cache_init_mutex_key; mysql_pfs_key_t fts_delete_mutex_key; mysql_pfs_key_t fts_doc_id_mutex_key; mysql_pfs_key_t fts_pll_tokenize_mutex_key; @@ -85,8 +87,6 @@ mysql_pfs_key_t dict_operation_lock_key; mysql_pfs_key_t index_tree_rw_lock_key; mysql_pfs_key_t index_online_log_key; mysql_pfs_key_t fil_space_latch_key; -mysql_pfs_key_t fts_cache_rw_lock_key; -mysql_pfs_key_t fts_cache_init_rw_lock_key; mysql_pfs_key_t trx_i_s_cache_lock_key; mysql_pfs_key_t trx_purge_latch_key; #endif /* UNIV_PFS_RWLOCK */ |