summaryrefslogtreecommitdiff
path: root/src/os/JournalingObjectStore.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/JournalingObjectStore.cc')
-rw-r--r--src/os/JournalingObjectStore.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/os/JournalingObjectStore.cc b/src/os/JournalingObjectStore.cc
index b54b33cd969..67600cf09dc 100644
--- a/src/os/JournalingObjectStore.cc
+++ b/src/os/JournalingObjectStore.cc
@@ -128,8 +128,7 @@ uint64_t JournalingObjectStore::_op_apply_start(uint64_t op)
Cond cond;
ops_apply_blocked.push_back(&cond);
dout(10) << "op_apply_start " << op << " blocked (getting in back of line)" << dendl;
- // sleep until we are not blocked AND we are at the front of line
- while (blocked || ops_apply_blocked.front() != &cond)
+ while (blocked && ops_apply_blocked.front() != &cond)
cond.Wait(journal_lock);
dout(10) << "op_apply_start " << op << " woke (at front of line)" << dendl;
ops_apply_blocked.pop_front();
@@ -137,17 +136,19 @@ uint64_t JournalingObjectStore::_op_apply_start(uint64_t op)
dout(10) << "op_apply_start " << op << " ...and kicking next in line" << dendl;
ops_apply_blocked.front()->Signal();
}
+ } else {
+ dout(10) << "op_apply_start " << op << dendl;
}
- dout(10) << "op_apply_start " << op << " open_ops " << open_ops << " -> " << (open_ops+1) << dendl;
- assert(!blocked);
+
open_ops++;
+
return op;
}
void JournalingObjectStore::op_apply_finish(uint64_t op)
{
+ dout(10) << "op_apply_finish " << op << dendl;
journal_lock.Lock();
- dout(10) << "op_apply_finish " << op << " open_ops " << open_ops << " -> " << (open_ops-1) << dendl;
if (--open_ops == 0)
cond.Signal();
@@ -218,9 +219,7 @@ bool JournalingObjectStore::commit_start()
dout(10) << "commit_start blocked, waiting for " << open_ops << " open ops" << dendl;
cond.Wait(journal_lock);
}
- dout(10) << "commit_start blocked, all open_ops have completed" << dendl;
- assert(open_ops == 0);
-
+
if (applied_seq == committed_seq && !force_commit) {
dout(10) << "commit_start nothing to do" << dendl;
blocked = false;