]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/newstore: clean up kv commit debug output
authorSage Weil <sage@redhat.com>
Wed, 29 Apr 2015 22:00:46 +0000 (15:00 -0700)
committerSage Weil <sage@redhat.com>
Tue, 1 Sep 2015 17:39:42 +0000 (13:39 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/newstore/NewStore.cc

index de2f893a628cd7741885e82146379bd3796a7b05..566e778a8614beb19573a2d7420313c28eb26286 100644 (file)
@@ -2372,13 +2372,16 @@ void NewStore::_kv_sync_thread()
       kv_cond.Wait(kv_lock);
       dout(20) << __func__ << " wake" << dendl;
     } else {
-      dout(20) << __func__ << " committing " << kv_queue.size() << " cleaning " << wal_cleanup_queue.size() << dendl;
+      dout(20) << __func__ << " committing " << kv_queue.size()
+              << " cleaning " << wal_cleanup_queue.size() << dendl;
       kv_committing.swap(kv_queue);
       wal_cleaning.swap(wal_cleanup_queue);
       utime_t start = ceph_clock_now(NULL);
       kv_lock.Unlock();
+
+      // one transaction to force a sync.  clean up wal keys while we
+      // are at it.
       KeyValueDB::Transaction txc_cleanup_sync = db->get_transaction();
-      //adding wal cleanup op
       for (std::deque<TransContext *>::iterator it = wal_cleaning.begin();
            it != wal_cleaning.end();
            it++) {
@@ -2404,11 +2407,11 @@ void NewStore::_kv_sync_thread()
        get_wal_key(wt.seq, &key);
        txc_cleanup_sync->rmkey(PREFIX_WAL, key);
       }
-
       db->submit_transaction_sync(txc_cleanup_sync);
       utime_t finish = ceph_clock_now(NULL);
       utime_t dur = finish - start;
-      dout(20) << __func__ << " committed " << kv_committing.size() << "cleaned " << wal_cleaning.size()
+      dout(20) << __func__ << " committed " << kv_committing.size()
+              << " cleaned " << wal_cleaning.size()
               << " in " << dur << dendl;
       while (!kv_committing.empty()) {
        TransContext *txc = kv_committing.front();