From: Samuel Just Date: Thu, 11 Dec 2014 21:05:54 +0000 (-0800) Subject: ReplicatedPG::scan_range: an object can disappear between the list and the attr get X-Git-Tag: v0.91~52^2~4^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F3156%2Fhead;p=ceph.git ReplicatedPG::scan_range: an object can disappear between the list and the attr get 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 --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 95b61a311224..17563b3239b8 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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;