From: Samuel Just Date: Thu, 12 Jul 2012 23:45:26 +0000 (-0700) Subject: ReplicatedPG: don't mark repop done until apply completes X-Git-Tag: v0.50~74 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bcfa573f5f615f3403ff71da0212cd1cee7e7d9c;p=ceph.git ReplicatedPG: don't mark repop done until apply completes Consider the following sequence: 1. issue, apply repop 2. replicas and primary commit Here, repop->waitfor_(ack|disk) are empty, so we mark repop->done and remove_repop. 3. interval change, repops still in queue are marked aborted 4. activate, last_update_applied = last_update 5. the repop from one enters apply_repop, is not aborted, and finds that last_update_applied has passed it by. Fixes #2749 Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 54a2a785d857..16af52ea0229 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -3584,7 +3584,8 @@ void ReplicatedPG::eval_repop(RepGather *repop) } // done. - if (repop->waitfor_ack.empty() && repop->waitfor_disk.empty()) { + if (repop->waitfor_ack.empty() && repop->waitfor_disk.empty() && + repop->applied) { repop->done = true; calc_min_last_complete_ondisk();