]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::scan_range: an object can disappear between the list and the attr get 4077/head
authorSamuel Just <sjust@redhat.com>
Thu, 11 Dec 2014 21:05:54 +0000 (13:05 -0800)
committerLoic Dachary <ldachary@redhat.com>
Wed, 18 Mar 2015 22:39:18 +0000 (23:39 +0100)
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>
(cherry picked from commit dce6f288ad541fe7f0ef8374301cd712dd3bfa39)

src/osd/ReplicatedPG.cc

index b9edd70f44be7a0688935cf91e769fde1f5a5309..a752b5c2d4b3b44de7b80efb8c29feab3dc33fbc 100644 (file)
@@ -10855,6 +10855,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;