From deec81b4e96f903e0c2f9dc5738b05feb1f0deb3 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Mon, 30 Jul 2012 16:58:56 -0700 Subject: 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 --- src/osd/ReplicatedPG.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 2effb64346c..ee1f8597162 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; -- cgit v1.2.3