Merge PR #30715 into master

* refs/pull/30715/head:
	osd/PrimaryLogPG: skip obcs that don't exist during backfill scan_range

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
This commit is contained in:
Sage Weil 2019-10-06 09:05:27 -05:00
commit 18e45ca3a1

View File

@ -13339,16 +13339,22 @@ void PrimaryLogPG::scan_range(
if (is_primary())
obc = object_contexts.lookup(*p);
if (obc) {
if (!obc->obs.exists) {
/* 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.
*/
continue;
}
bi->objects[*p] = obc->obs.oi.version;
dout(20) << " " << *p << " " << obc->obs.oi.version << dendl;
} 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.
*/
* 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;