]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: clear waiting_for_ack when we send the commit
authorSamuel Just <sam.just@inktank.com>
Mon, 30 Jul 2012 23:58:56 +0000 (16:58 -0700)
committerSamuel Just <sam.just@inktank.com>
Tue, 31 Jul 2012 21:26:19 +0000 (14:26 -0700)
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>
src/osd/ReplicatedPG.cc

index 2effb64346c6d7791309fa2fb7ba9e594959b29a..ee1f85971625cd7c72c44e50e1cd27d1a36af8d5 100644 (file)
@@ -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;