]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::scan_range: an object can disappear between the list and the attr get 3156/head
authorSamuel Just <sjust@redhat.com>
Thu, 11 Dec 2014 21:05:54 +0000 (13:05 -0800)
committerSamuel Just <sjust@redhat.com>
Thu, 11 Dec 2014 21:05:54 +0000 (13:05 -0800)
The first item in the range is often last_backfill, upon which writes
can be occuring.  It's trimmed off on the primary side anyway.

Fixes: 10150
Backport: dumpling, firefly, giant
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/ReplicatedPG.cc

index 95b61a3112246da131e2b8981090659cd230f069..17563b3239b8840f57fbebe9fbb46212a99e0b93 100644 (file)
@@ -10546,6 +10546,14 @@ void ReplicatedPG::scan_range(
     } else {
       bufferlist bl;
       int r = pgbackend->objects_get_attr(*p, OI_ATTR, &bl);
+
+      /* If the object does not exist here, it must have been removed
+        * between the collection_list_partial and here.  This can happen
+        * for the first item in the range, which is usually last_backfill.
+        */
+      if (r == -ENOENT)
+       continue;
+
       assert(r >= 0);
       object_info_t oi(bl);
       bi->objects[*p] = oi.version;