Commit 46890349 authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: Remove fts_t::bg_threads_mutex, fts_t::bg_threads

The unused fts_t::bg_threads was added in
mysql/mysql-server@4b1049625c00dbfcd9d7a11ad12a84695ab747e3.

Any usage of fts_t::bg_threads_mutex was removed in
mysql/mysql-server@33c2404b397e1077daaf0ef0ff9edba445430f5f.
parent d6b33ea2
......@@ -5359,7 +5359,6 @@ fts_t::fts_t(
mem_heap_t* heap)
:
added_synced(0), dict_locked(0),
bg_threads(0),
add_wq(NULL),
cache(NULL),
doc_col(ULINT_UNDEFINED), in_queue(false),
......@@ -5367,8 +5366,6 @@ fts_t::fts_t(
{
ut_a(table->fts == NULL);
mutex_create(LATCH_ID_FTS_BG_THREADS, &bg_threads_mutex);
ib_alloc_t* heap_alloc = ib_heap_allocator_create(fts_heap);
indexes = ib_vector_create(heap_alloc, sizeof(dict_index_t*), 4);
......@@ -5379,8 +5376,6 @@ fts_t::fts_t(
/** fts_t destructor. */
fts_t::~fts_t()
{
mutex_free(&bg_threads_mutex);
ut_ad(add_wq == NULL);
if (cache != NULL) {
......
......@@ -586,7 +586,6 @@ static PSI_mutex_info all_innodb_mutexes[] = {
PSI_KEY(file_format_max_mutex),
PSI_KEY(fil_system_mutex),
PSI_KEY(flush_list_mutex),
PSI_KEY(fts_bg_threads_mutex),
PSI_KEY(fts_delete_mutex),
PSI_KEY(fts_doc_id_mutex),
PSI_KEY(log_flush_order_mutex),
......
......@@ -317,19 +317,11 @@ class fts_t {
/** fts_t destructor. */
~fts_t();
/** Mutex protecting bg_threads* and fts_add_wq. */
ib_mutex_t bg_threads_mutex;
/** Whether the ADDED table record sync-ed after
crash recovery; protected by bg_threads_mutex */
/** Whether the ADDED table record sync-ed after crash recovery */
unsigned added_synced:1;
/** Whether the table holds dict_sys->mutex;
protected by bg_threads_mutex */
/** Whether the table holds dict_sys->mutex */
unsigned dict_locked:1;
/** Number of background threads accessing this table. */
ulint bg_threads;
/** Work queue for scheduling jobs for the FTS 'Add' thread, or NULL
if the thread has not yet been created. Each work item is a
fts_trx_doc_ids_t*. */
......
......@@ -60,7 +60,6 @@ extern mysql_pfs_key_t dict_sys_mutex_key;
extern mysql_pfs_key_t file_format_max_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_bg_threads_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;
......
......@@ -219,7 +219,6 @@ enum latch_level_t {
SYNC_FTS_TOKENIZE,
SYNC_FTS_OPTIMIZE,
SYNC_FTS_BG_THREADS,
SYNC_FTS_CACHE_INIT,
SYNC_RECV,
SYNC_LOG_FLUSH_ORDER,
......@@ -305,7 +304,6 @@ enum latch_id_t {
LATCH_ID_FILE_FORMAT_MAX,
LATCH_ID_FIL_SYSTEM,
LATCH_ID_FLUSH_LIST,
LATCH_ID_FTS_BG_THREADS,
LATCH_ID_FTS_DELETE,
LATCH_ID_FTS_DOC_ID,
LATCH_ID_FTS_PLL_TOKENIZE,
......
......@@ -464,7 +464,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_BG_THREADS);
LEVEL_MAP_INSERT(SYNC_FTS_CACHE_INIT);
LEVEL_MAP_INSERT(SYNC_RECV);
LEVEL_MAP_INSERT(SYNC_LOG_FLUSH_ORDER);
......@@ -743,7 +742,6 @@ LatchDebug::check_order(
case SYNC_MONITOR_MUTEX:
case SYNC_RECV:
case SYNC_FTS_BG_THREADS:
case SYNC_WORK_QUEUE:
case SYNC_FTS_TOKENIZE:
case SYNC_FTS_OPTIMIZE:
......@@ -1315,9 +1313,6 @@ sync_latch_meta_init()
LATCH_ADD_MUTEX(FLUSH_LIST, SYNC_BUF_FLUSH_LIST, flush_list_mutex_key);
LATCH_ADD_MUTEX(FTS_BG_THREADS, SYNC_FTS_BG_THREADS,
fts_bg_threads_mutex_key);
LATCH_ADD_MUTEX(FTS_DELETE, SYNC_FTS_OPTIMIZE, fts_delete_mutex_key);
LATCH_ADD_MUTEX(FTS_DOC_ID, SYNC_FTS_OPTIMIZE, fts_doc_id_mutex_key);
......
......@@ -46,7 +46,6 @@ mysql_pfs_key_t dict_sys_mutex_key;
mysql_pfs_key_t file_format_max_mutex_key;
mysql_pfs_key_t fil_system_mutex_key;
mysql_pfs_key_t flush_list_mutex_key;
mysql_pfs_key_t fts_bg_threads_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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment