Merge pull request #3156 from athanatos/wip-10150

ReplicatedPG::scan_range: an object can disappear between the list and t...

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2014-12-11 13:23:28 -08:00
commit 69507e51b5

View File

@ -10977,6 +10977,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;