Skip to content

Commit

Permalink
Merge pull request #12911 from athanatos/wip-18165
Browse files Browse the repository at this point in the history
osd/PrimaryLogPG::failed_push: update missing as well
  • Loading branch information
liewegas committed Jan 12, 2017
2 parents dfc3ecf + dd48b97 commit aa82b14
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/osd/PG.h
Expand Up @@ -424,6 +424,12 @@ class PG : protected DoutPrefixProvider {
ThreadPool::TPHandle* handle ///< [in] ThreadPool handle
);

/// Returns version needed
eversion_t get_version_needed(const hobject_t &hoid) const {
assert(needs_recovery_map.count(hoid));
return needs_recovery_map.at(hoid).need;
}

/// Uses osdmap to update structures for now down sources
void check_recovery_sources(const OSDMapRef& osdmap);

Expand Down
6 changes: 5 additions & 1 deletion src/osd/PrimaryLogPG.cc
Expand Up @@ -9775,8 +9775,12 @@ void PrimaryLogPG::failed_push(const list<pg_shard_t> &from, const hobject_t &so
requeue_ops(blocked_ops);
}
recovering.erase(soid);
for (auto&& i : from)
for (auto&& i : from) {
missing_loc.remove_location(soid, i);
auto miter = peer_missing.find(i);
assert(miter != peer_missing.end());
miter->second.add(soid, missing_loc.get_version_needed(soid), eversion_t());
}
dout(0) << __func__ << " " << soid << " from shard " << from
<< ", reps on " << missing_loc.get_locations(soid)
<< " unfound? " << missing_loc.is_unfound(soid) << dendl;
Expand Down

0 comments on commit aa82b14

Please sign in to comment.