* couchbase/3.0.x:
MB-19226: Address potential data races in the warmup code
MB-19225: Fix data race on Flusher::taskId
MB-19225: Fix race in Flusher._state
MB-19224: Address possible data race with global task's waketime
Change-Id: Idc461799bc50bd1274f3ffafab4b3257a024327b
}
void Flusher::wake(void) {
- LockHolder lh(taskMutex);
- cb_assert(taskId > 0);
- ExecutorPool::get()->wake(taskId);
+ // taskId becomes zero if the flusher were stopped
+ if (taskId > 0) {
+ ExecutorPool::get()->wake(taskId);
+ }
}
bool Flusher::step(GlobalTask *task) {