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)
} 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;