dout(10) << "op_apply_finish " << op << " open_ops " << open_ops
<< " -> " << (open_ops-1)
<< ", max_applying_seq " << max_applying_seq
- << ", applied_seq " << applied_seq << " -> " << MAX(op, applied_seq)
+ << ", max_applied_seq " << max_applied_seq << " -> " << MAX(op, max_applied_seq)
<< dendl;
if (--open_ops == 0)
open_ops_cond.Signal();
// there can be multiple applies in flight; track the max value we
// note. note that we can't _read_ this value and learn anything
// meaningful unless/until we've quiesced all in-flight applies.
- if (op > applied_seq)
- applied_seq = op;
+ if (op > max_applied_seq)
+ max_applied_seq = op;
}
uint64_t JournalingObjectStore::SubmitManager::op_submit_start()
{
Mutex::Locker l(apply_lock);
dout(10) << "commit_start max_applying_seq " << max_applying_seq
- << ", applied_seq " << applied_seq
+ << ", max_applied_seq " << max_applied_seq
<< dendl;
blocked = true;
while (open_ops > 0) {
dout(10) << "commit_start blocked, waiting for " << open_ops << " open ops, "
- << " max_applying_seq " << max_applying_seq << " applied_seq " << applied_seq << dendl;
+ << " max_applying_seq " << max_applying_seq << " max_applied_seq " << max_applied_seq << dendl;
open_ops_cond.Wait(apply_lock);
}
assert(open_ops == 0);
- assert(applied_seq == max_applying_seq);
+ assert(max_applied_seq == max_applying_seq);
dout(10) << "commit_start blocked, all open_ops have completed" << dendl;
{
Mutex::Locker l(com_lock);
- if (applied_seq == committed_seq) {
+ if (max_applied_seq == committed_seq) {
dout(10) << "commit_start nothing to do" << dendl;
blocked = false;
if (!ops_apply_blocked.empty())
int open_ops;
Cond open_ops_cond;
uint64_t max_applying_seq;
- uint64_t applied_seq;
+ uint64_t max_applied_seq;
Mutex com_lock;
map<version_t, vector<Context*> > commit_waiters;
blocked(false),
open_ops(0),
max_applying_seq(0),
- applied_seq(0),
+ max_applied_seq(0),
com_lock("JOS::ApplyManager::com_lock", false, true, false, g_ceph_context),
committing_seq(0), committed_seq(0) {}
void add_waiter(uint64_t, Context*);
}
{
Mutex::Locker l(apply_lock);
- max_applying_seq = applied_seq = fs_op_seq;
+ max_applying_seq = max_applied_seq = fs_op_seq;
}
}
} apply_manager;