diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-01-21 18:32:48 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-01-21 18:32:48 +0530 |
commit | ce906485872a1ac3def55bc187bdbb46800366fb (patch) | |
tree | d6ad27a8dd349d53cd3ee90a53c617dddb8ab81b | |
parent | 9930cb22c7b894100c17d6873c628012856ad7d0 (diff) | |
download | mariadb-git-ce906485872a1ac3def55bc187bdbb46800366fb.tar.gz |
MDEV-24638 Avoid repetitive FTS SYNC request for tablebb-10.5-MDEV-24638
fts_optimize_request_sync_table() can avoid the repetitive
FTS SYNC request of the table if the table already has FTS_SYNC
message in fts_optimize_wq queue.
Reviewed-by: Marko Mäkelä
-rw-r--r-- | storage/innobase/fts/fts0opt.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc index b0324bf7667..e69aa93b6d8 100644 --- a/storage/innobase/fts/fts0opt.cc +++ b/storage/innobase/fts/fts0opt.cc @@ -2658,6 +2658,13 @@ fts_optimize_request_sync_table( mutex_enter(&fts_optimize_wq->mutex); + if (table->fts->sync_message) { + /* If the table already has SYNC message in + fts_optimize_wq queue then ignore it */ + mutex_exit(&fts_optimize_wq->mutex); + return; + } + add_msg(msg, true); table->fts->sync_message = true; |