From: Sage Weil Date: Mon, 13 Jan 2020 14:51:48 +0000 (-0600) Subject: kv/RocksDBStore: break out of compaction thread early on shutdown X-Git-Tag: v15.1.0~210^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F32619%2Fhead;p=ceph.git kv/RocksDBStore: break out of compaction thread early on shutdown Fixes: https://tracker.ceph.com/issues/43587 Signed-off-by: Sage Weil --- diff --git a/src/kv/RocksDBStore.cc b/src/kv/RocksDBStore.cc index 841e4f322c7..4ef17d7d226 100644 --- a/src/kv/RocksDBStore.cc +++ b/src/kv/RocksDBStore.cc @@ -1226,7 +1226,7 @@ void RocksDBStore::compact_thread_entry() std::unique_lock l{compact_queue_lock}; dout(10) << __func__ << " enter" << dendl; while (!compact_queue_stop) { - while (!compact_queue.empty()) { + if (!compact_queue.empty()) { pair range = compact_queue.front(); compact_queue.pop_front(); logger->set(l_rocksdb_compact_queue_len, compact_queue.size());