We observed a sequence like:
- replay journal
- sets JournalingObjectStore applied_op_seq
- umount
- mount
- initiate commit with prevous applied_op_seq
- replay journal
- commit finishes
- on replay commit, we fail assert op > committed_seq
Although strictly speaking the assert failure is harmless here, in general
we should not let state leak through from a previous mount into this
mount or else assertions are in general more difficult to reason about.
Fixes: #8019
Signed-off-by: Sage Weil <sage@inktank.com>
delete journal;
journal = 0;
}
+ apply_manager.reset();
}
int JournalingObjectStore::journal_replay(uint64_t fs_op_seq)
max_applied_seq(0),
com_lock("JOS::ApplyManager::com_lock", false, true, false, g_ceph_context),
committing_seq(0), committed_seq(0) {}
+ void reset() {
+ assert(open_ops == 0);
+ assert(blocked == false);
+ max_applied_seq = 0;
+ committing_seq = 0;
+ committed_seq = 0;
+ }
void add_waiter(uint64_t, Context*);
uint64_t op_apply_start(uint64_t op);
void op_apply_finish(uint64_t op);