* Async flush_commit
*
* There are two cases:
- * 1) sequencer is currently idle: the method returns true and
- * c is deleted
+ * 1) sequencer is currently idle: the method returns true. c is
+ * not touched.
* 2) sequencer is not idle: the method returns false and c is
* called asyncronously with a value of 0 once all transactions
* queued on this sequencer prior to the call have been applied
/// @see Sequencer_impl::flush_commit()
bool flush_commit(Context *c) {
if (!p) {
- delete c;
return true;
} else {
return p->flush_commit(c);
dout(10) << "Clearing blocked outgoing recovery messages" << dendl;
recovery_state.clear_blocked_outgoing();
- if (!osr->flush_commit(
- new QueuePeeringEvt<IntervalFlush>(
- this, get_osdmap()->get_epoch(), IntervalFlush()))) {
+ Context *c = new QueuePeeringEvt<IntervalFlush>(
+ this, get_osdmap()->get_epoch(), IntervalFlush());
+ if (!osr->flush_commit(c)) {
dout(10) << "Beginning to block outgoing recovery messages" << dendl;
recovery_state.begin_block_outgoing();
} else {
dout(10) << "Not blocking outgoing recovery messages" << dendl;
+ delete c;
}
}