Skip to content

Commit

Permalink
MDEV-22787 postfix
Browse files Browse the repository at this point in the history
Ensure that FTS_MSG_STOP is the very last message, and nothing comes after
it in fts_optimize_shutdown.

Stop the timer to ensure that.
  • Loading branch information
vaintroub committed Jun 3, 2020
1 parent 4c52223 commit e7bab05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions storage/innobase/fts/fts0opt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ ib_wqueue_t* fts_optimize_wq;
static void fts_optimize_callback(void *);
static void timer_callback(void*);
static tpool::timer* timer;

static tpool::task_group task_group(1);
static tpool::task task(fts_optimize_callback,0, &task_group);

Expand Down Expand Up @@ -3014,6 +3015,7 @@ fts_optimize_shutdown()
/* We tell the OPTIMIZE thread to switch to state done, we
can't delete the work queue here because the add thread needs
deregister the FTS tables. */
timer->disarm();
task_group.cancel_pending(&task);

msg = fts_optimize_create_msg(FTS_MSG_STOP, NULL);
Expand Down

0 comments on commit e7bab05

Please sign in to comment.