]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/PG: do not queue scrub if PG is not active when unblock
authorSage Weil <sage@redhat.com>
Wed, 19 Jun 2019 19:20:32 +0000 (14:20 -0500)
committerSage Weil <sage@redhat.com>
Wed, 19 Jun 2019 19:20:44 +0000 (14:20 -0500)
- we are scrubbing
- we block scrub on an object
- we have an interval reset on epoch X
- we unblock and queue scrub in epoch X
- we finish the reset (we are no longer scrubbing)
- we process the PGScrub on epoch X, it is still epoch X, and we are not
  scrubbing
  -> assert

Fix by not queueing scrub if we are unblocking and the PG is no longer
active (because we are mid-way through the peering reset).

Fixes: http://tracker.ceph.com/issues/40451
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PrimaryLogPG.cc

index bc104a64c8977bb78a6ea5c2aa12ef909af43277..2f9e5d498a7f8d2e2d93b57096b4f529719fb9d0 100644 (file)
@@ -11185,7 +11185,11 @@ void PrimaryLogPG::kick_object_context_blocked(ObjectContextRef obc)
 
   if (obc->requeue_scrub_on_unblock) {
     obc->requeue_scrub_on_unblock = false;
-    requeue_scrub();
+    // only requeue if we are still active: we may be unblocking
+    // because we are resetting for a new peering interval
+    if (is_active()) {
+      requeue_scrub();
+    }
   }
 }