]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kv/RocksDBStore: debug async compaction
authorSage Weil <sage@redhat.com>
Mon, 13 Jan 2020 14:51:33 +0000 (08:51 -0600)
committerSage Weil <sage@redhat.com>
Tue, 14 Jan 2020 14:47:22 +0000 (08:47 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/kv/RocksDBStore.cc

index ab6edb70aeba7607cf609e11ab9d21eec6f545e7..841e4f322c772c9e13efe48e67c43986cd900b1e 100644 (file)
@@ -667,10 +667,12 @@ void RocksDBStore::close()
   // stop compaction thread
   compact_queue_lock.lock();
   if (compact_thread.is_started()) {
+    dout(1) << __func__ << " waiting for compaction thread to stop" << dendl;
     compact_queue_stop = true;
     compact_queue_cond.notify_all();
     compact_queue_lock.unlock();
     compact_thread.join();
+    dout(1) << __func__ << " compaction thread to stopped" << dendl;    
   } else {
     compact_queue_lock.unlock();
   }
@@ -1222,6 +1224,7 @@ void RocksDBStore::compact()
 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()) {
       pair<string,string> range = compact_queue.front();
@@ -1237,8 +1240,10 @@ void RocksDBStore::compact_thread_entry()
       l.lock();
       continue;
     }
+    dout(10) << __func__ << " waiting" << dendl;
     compact_queue_cond.wait(l);
   }
+  dout(10) << __func__ << " exit" << dendl;
 }
 
 void RocksDBStore::compact_range_async(const string& start, const string& end)