From: Samuel Just Date: Mon, 30 Jul 2012 23:58:56 +0000 (-0700) Subject: ReplicatedPG: clear waiting_for_ack when we send the commit X-Git-Tag: v0.51~52 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=deec81b4e96f903e0c2f9dc5738b05feb1f0deb3;p=ceph.git ReplicatedPG: clear waiting_for_ack when we send the commit 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 --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 2effb64346c6..ee1f85971625 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -3553,6 +3553,12 @@ void ReplicatedPG::eval_repop(RepGather *repop) 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;