summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2012-07-31 01:58:56 +0200
committerSamuel Just <sam.just@inktank.com>2012-07-31 23:26:19 +0200
commitdeec81b4e96f903e0c2f9dc5738b05feb1f0deb3 (patch)
tree77d9db09be04d401d63e7d271cbc96da4cd1907b /src
parentMerge remote-tracking branch 'upstream/wip-leveldb-iterators' (diff)
downloadceph-deec81b4e96f903e0c2f9dc5738b05feb1f0deb3.tar.xz
ceph-deec81b4e96f903e0c2f9dc5738b05feb1f0deb3.zip
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 <sam.just@inktank.com>
Diffstat (limited to 'src')
-rw-r--r--src/osd/ReplicatedPG.cc6
1 files changed, 6 insertions, 0 deletions
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;