Skip to content

Commit 4689034

Browse files
committed
Cleanup: Remove fts_t::bg_threads_mutex, fts_t::bg_threads
The unused fts_t::bg_threads was added in mysql/mysql-server@4b10496. Any usage of fts_t::bg_threads_mutex was removed in mysql/mysql-server@33c2404.
1 parent d6b33ea commit 4689034

File tree

7 files changed

+2
-25
lines changed

7 files changed

+2
-25
lines changed

storage/innobase/fts/fts0fts.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5359,16 +5359,13 @@ fts_t::fts_t(
53595359
mem_heap_t* heap)
53605360
:
53615361
added_synced(0), dict_locked(0),
5362-
bg_threads(0),
53635362
add_wq(NULL),
53645363
cache(NULL),
53655364
doc_col(ULINT_UNDEFINED), in_queue(false),
53665365
fts_heap(heap)
53675366
{
53685367
ut_a(table->fts == NULL);
53695368

5370-
mutex_create(LATCH_ID_FTS_BG_THREADS, &bg_threads_mutex);
5371-
53725369
ib_alloc_t* heap_alloc = ib_heap_allocator_create(fts_heap);
53735370

53745371
indexes = ib_vector_create(heap_alloc, sizeof(dict_index_t*), 4);
@@ -5379,8 +5376,6 @@ fts_t::fts_t(
53795376
/** fts_t destructor. */
53805377
fts_t::~fts_t()
53815378
{
5382-
mutex_free(&bg_threads_mutex);
5383-
53845379
ut_ad(add_wq == NULL);
53855380

53865381
if (cache != NULL) {

storage/innobase/handler/ha_innodb.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,6 @@ static PSI_mutex_info all_innodb_mutexes[] = {
586586
PSI_KEY(file_format_max_mutex),
587587
PSI_KEY(fil_system_mutex),
588588
PSI_KEY(flush_list_mutex),
589-
PSI_KEY(fts_bg_threads_mutex),
590589
PSI_KEY(fts_delete_mutex),
591590
PSI_KEY(fts_doc_id_mutex),
592591
PSI_KEY(log_flush_order_mutex),

storage/innobase/include/fts0fts.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -317,19 +317,11 @@ class fts_t {
317317
/** fts_t destructor. */
318318
~fts_t();
319319

320-
/** Mutex protecting bg_threads* and fts_add_wq. */
321-
ib_mutex_tbg_threads_mutex;
322-
323-
/** Whether the ADDED table record sync-ed after
324-
crash recovery; protected by bg_threads_mutex */
320+
/** Whether the ADDED table record sync-ed after crash recovery */
325321
unsignedadded_synced:1;
326-
/** Whether the table holds dict_sys->mutex;
327-
protected by bg_threads_mutex */
322+
/** Whether the table holds dict_sys->mutex */
328323
unsigneddict_locked:1;
329324

330-
/** Number of background threads accessing this table. */
331-
ulint bg_threads;
332-
333325
/** Work queue for scheduling jobs for the FTS 'Add' thread, or NULL
334326
if the thread has not yet been created. Each work item is a
335327
fts_trx_doc_ids_t*. */

storage/innobase/include/sync0sync.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ extern mysql_pfs_key_t dict_sys_mutex_key;
6060
extern mysql_pfs_key_tfile_format_max_mutex_key;
6161
extern mysql_pfs_key_tfil_system_mutex_key;
6262
extern mysql_pfs_key_tflush_list_mutex_key;
63-
extern mysql_pfs_key_tfts_bg_threads_mutex_key;
6463
extern mysql_pfs_key_tfts_delete_mutex_key;
6564
extern mysql_pfs_key_tfts_doc_id_mutex_key;
6665
extern mysql_pfs_key_tfts_pll_tokenize_mutex_key;

storage/innobase/include/sync0types.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ enum latch_level_t {
219219

220220
SYNC_FTS_TOKENIZE,
221221
SYNC_FTS_OPTIMIZE,
222-
SYNC_FTS_BG_THREADS,
223222
SYNC_FTS_CACHE_INIT,
224223
SYNC_RECV,
225224
SYNC_LOG_FLUSH_ORDER,
@@ -305,7 +304,6 @@ enum latch_id_t {
305304
LATCH_ID_FILE_FORMAT_MAX,
306305
LATCH_ID_FIL_SYSTEM,
307306
LATCH_ID_FLUSH_LIST,
308-
LATCH_ID_FTS_BG_THREADS,
309307
LATCH_ID_FTS_DELETE,
310308
LATCH_ID_FTS_DOC_ID,
311309
LATCH_ID_FTS_PLL_TOKENIZE,

storage/innobase/sync/sync0debug.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,6 @@ LatchDebug::LatchDebug()
464464
LEVEL_MAP_INSERT(SYNC_WORK_QUEUE);
465465
LEVEL_MAP_INSERT(SYNC_FTS_TOKENIZE);
466466
LEVEL_MAP_INSERT(SYNC_FTS_OPTIMIZE);
467-
LEVEL_MAP_INSERT(SYNC_FTS_BG_THREADS);
468467
LEVEL_MAP_INSERT(SYNC_FTS_CACHE_INIT);
469468
LEVEL_MAP_INSERT(SYNC_RECV);
470469
LEVEL_MAP_INSERT(SYNC_LOG_FLUSH_ORDER);
@@ -743,7 +742,6 @@ LatchDebug::check_order(
743742

744743
case SYNC_MONITOR_MUTEX:
745744
case SYNC_RECV:
746-
case SYNC_FTS_BG_THREADS:
747745
case SYNC_WORK_QUEUE:
748746
case SYNC_FTS_TOKENIZE:
749747
case SYNC_FTS_OPTIMIZE:
@@ -1315,9 +1313,6 @@ sync_latch_meta_init()
13151313

13161314
LATCH_ADD_MUTEX(FLUSH_LIST, SYNC_BUF_FLUSH_LIST, flush_list_mutex_key);
13171315

1318-
LATCH_ADD_MUTEX(FTS_BG_THREADS, SYNC_FTS_BG_THREADS,
1319-
fts_bg_threads_mutex_key);
1320-
13211316
LATCH_ADD_MUTEX(FTS_DELETE, SYNC_FTS_OPTIMIZE, fts_delete_mutex_key);
13221317

13231318
LATCH_ADD_MUTEX(FTS_DOC_ID, SYNC_FTS_OPTIMIZE, fts_doc_id_mutex_key);

storage/innobase/sync/sync0sync.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ mysql_pfs_key_t dict_sys_mutex_key;
4646
mysql_pfs_key_tfile_format_max_mutex_key;
4747
mysql_pfs_key_tfil_system_mutex_key;
4848
mysql_pfs_key_tflush_list_mutex_key;
49-
mysql_pfs_key_tfts_bg_threads_mutex_key;
5049
mysql_pfs_key_tfts_delete_mutex_key;
5150
mysql_pfs_key_tfts_doc_id_mutex_key;
5251
mysql_pfs_key_tfts_pll_tokenize_mutex_key;

0 commit comments

Comments
 (0)