Bug #18162 » ec-handle-error-create-loc-list.patch
src/osd/ECBackend.cc | ||
---|---|---|
// Make sure we don't do redundant reads for recovery
|
||
assert(!for_recovery || !do_redundant_reads);
|
||
map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator>::const_iterator miter =
|
||
get_parent()->get_missing_loc_shards().find(hoid);
|
||
set<int> have;
|
||
map<shard_id_t, pg_shard_t> shards;
|
||
... | ... | |
}
|
||
}
|
||
if (miter != get_parent()->get_missing_loc_shards().end()) {
|
||
bool miter_first = true;
|
||
for (map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator>::const_iterator miter =
|
||
get_parent()->get_missing_loc_shards().find(hoid);
|
||
miter != get_parent()->get_missing_loc_shards().end();
|
||
miter++) {
|
||
if (miter_first) {
|
||
dout(20) << __func__ << hoid
|
||
<< " has missing_loc, resetting have" << dendl;
|
||
miter_first = false;
|
||
have.clear();
|
||
}
|
||
dout(20) << __func__ << hoid
|
||
<< " presumed available at " << miter->second
|
||
<< dendl;
|
||
for (set<pg_shard_t>::iterator i = miter->second.begin();
|
||
i != miter->second.end();
|
||
++i) {
|
src/osd/ReplicatedPG.cc | ||
---|---|---|
r = pgbackend->objects_get_attr(oid.get_head(), SS_ATTR, &bv);
|
||
if (r < 0) {
|
||
// try _snapset
|
||
if (!(oid.is_snapdir() && !oid_existed))
|
||
r = pgbackend->objects_get_attr(oid.get_snapdir(), SS_ATTR, &bv);
|
||
if (!(oid.is_snapdir() && !oid_existed))
|
||
r = pgbackend->objects_get_attr(oid.get_snapdir(), SS_ATTR, &bv);
|
||
if (r < 0 && !can_create)
|
||
return NULL;
|
||
}
|
||
... | ... | |
obc->drop_recovery_read(&blocked_ops);
|
||
requeue_ops(blocked_ops);
|
||
}
|
||
recovering.erase(soid);
|
||
for (list<pg_shard_t>::const_iterator i = from.begin(); i != from.end(); i++)
|
||
if (missing_loc.get_locations(soid).empty()) {
|
||
dout(20) << __func__ << ": " << soid
|
||
<< " had an empty location list, reconstructing" << dendl;
|
||
assert(!actingbackfill.empty());
|
||
for (set<pg_shard_t>::iterator i = actingbackfill.begin();
|
||
i != actingbackfill.end(); ++i) {
|
||
pg_shard_t peer = *i;
|
||
if (!peer_missing[peer].is_missing(soid)) {
|
||
missing_loc.add_location(soid, peer);
|
||
dout(20) << __func__ << ": " << soid
|
||
<< " assumed to be available in " << peer << dendl;
|
||
}
|
||
}
|
||
}
|
||
for (list<pg_shard_t>::const_iterator i = from.begin();
|
||
i != from.end(); i++) {
|
||
dout(20) << __func__ << ": " << soid
|
||
<< " marked as not available in " << *i
|
||
<< dendl;
|
||
missing_loc.remove_location(soid, *i);
|
||
}
|
||
recovering.erase(soid);
|
||
dout(0) << "_failed_push " << soid << " from shard " << from
|
||
<< ", reps on " << missing_loc.get_locations(soid)
|
||
<< " unfound? " << missing_loc.is_unfound(soid) << dendl;
|
||
... | ... | |
handle.reset_tp_timeout();
|
||
const hobject_t soid(p->second);
|
||
if (cmp(soid, pi->second.last_backfill, get_sort_bitwise()) > 0) {
|
||
if (!recovering.count(soid)) {
|
||
derr << __func__ << ": object added to missing set for backfill, but "
|
||
<< "is not in recovering, error!" << dendl;
|
||
assert(0);
|
||
}
|
||
continue;
|
||
}
|
||
if (recovering.count(soid)) {
|
||
dout(10) << __func__ << ": already recovering " << soid << dendl;
|
||
continue;
|
||
... | ... | |
continue;
|
||
}
|
||
dout(10) << __func__ << ": recover_object_replicas(" << soid << ")" << dendl;
|
||
if (cmp(soid, pi->second.last_backfill, get_sort_bitwise()) > 0)
|
||
dout(0) << __func__ << ": recover_object_replicas(" << soid
|
||
<< ") retry with locations " << missing_loc.get_locations(soid)
|
||
<< dendl;
|
||
else
|
||
dout(10) << __func__ << ": recover_object_replicas(" << soid << ")"
|
||
<< dendl;
|
||
map<hobject_t,pg_missing_t::item, hobject_t::ComparatorWithDefault>::const_iterator r = m.missing.find(soid);
|
||
started += prep_object_replica_pushes(soid, r->second.need,
|
||
h);
|