It appears that db->submit_transaction() will block if there is a sync
commit that is in progress instead of simply queueing the new txn for
later. To work around this, submit these to the backend in the
kv_sync_thread prior to the synchronous submit_transaction_sync().
Signed-off-by: Sage Weil <sage@redhat.com>
txc->state = TransContext::STATE_KV_QUEUED;
if (!g_conf->newstore_sync_transaction) {
Mutex::Locker l(kv_lock);
- db->submit_transaction(txc->t);
kv_queue.push_back(txc);
kv_cond.SignalOne();
return;
utime_t start = ceph_clock_now(NULL);
kv_lock.Unlock();
+ for (std::deque<TransContext *>::iterator it = kv_committing.begin();
+ it != kv_committing.end();
+ it++) {
+ db->submit_transaction((*it)->t);
+ }
+
// one transaction to force a sync. clean up wal keys while we
// are at it.
KeyValueDB::Transaction txc_cleanup_sync = db->get_transaction();