]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: don't mark repop done until apply completes
authorSamuel Just <sam.just@inktank.com>
Thu, 12 Jul 2012 23:45:26 +0000 (16:45 -0700)
committerSamuel Just <sam.just@inktank.com>
Thu, 12 Jul 2012 23:52:37 +0000 (16:52 -0700)
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 <sam.just@inktank.com>
src/osd/ReplicatedPG.cc

index 54a2a785d85786d0c4a7d555048219658336fa39..16af52ea0229e200c9fedfee07142a6b48acfd6f 100644 (file)
@@ -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();