]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: treat object as degraded until on_global_recover
authorSamuel Just <sjust@redhat.com>
Mon, 17 Aug 2015 18:21:27 +0000 (11:21 -0700)
committerSamuel Just <sjust@redhat.com>
Tue, 18 Aug 2015 18:25:25 +0000 (11:25 -0700)
Otherwise, an op might slip by between on_local_recover and
on_global_recover.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/ReplicatedPG.cc

index 48f4277dbda16c2224e14f1df4548b694e1ff92e..98078f85d1f05e8e3939b82c428987e4a1db58e2 100644 (file)
@@ -413,6 +413,12 @@ void ReplicatedPG::wait_for_all_missing(OpRequestRef op)
 
 bool ReplicatedPG::is_degraded_or_backfilling_object(const hobject_t& soid)
 {
+  /* The conditions below may clear (on_local_recover, before we queue
+   * the tranasction) before we actually requeue the degraded waiters
+   * in on_global_recover after the transaction completes.
+   */
+  if (waiting_for_degraded_object.count(soid))
+    return true;
   if (pg_log.get_missing().missing.count(soid))
     return true;
   assert(!actingbackfill.empty());