From: Sage Weil Date: Wed, 29 Apr 2015 22:00:46 +0000 (-0700) Subject: os/newstore: clean up kv commit debug output X-Git-Tag: v9.1.0~242^2~22 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9c2eb2858950a2189f73717e31a978a914faca2a;p=ceph.git os/newstore: clean up kv commit debug output Signed-off-by: Sage Weil --- diff --git a/src/os/newstore/NewStore.cc b/src/os/newstore/NewStore.cc index de2f893a628c..566e778a8614 100644 --- a/src/os/newstore/NewStore.cc +++ b/src/os/newstore/NewStore.cc @@ -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::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();