Otherwise, we might send the ack anyway later, after a subsequent
commit is sent resulting in an out-of-order op.
This resulted in a a crash when the client encountered out of
order ops.
Signed-off-by: Samuel Just <sam.just@inktank.com>
waiting_for_ondisk.erase(repop->v);
}
+ // clear out acks, we sent the commits above
+ if (waiting_for_ack.count(repop->v)) {
+ assert(waiting_for_ack.begin()->first == repop->v);
+ waiting_for_ack.erase(repop->v);
+ }
+
if (m->wants_ondisk() && !repop->sent_disk) {
// send commit.
MOSDOpReply *reply = repop->ctx->reply;