MDEV-24638 Avoid repetitive FTS SYNC request for table

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ä
parent 816808d6
......@@ -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;
......
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