Skip to content

Commit

Permalink
osd: recency should look at newest (not oldest) hitsets
Browse files Browse the repository at this point in the history
Reported-by: xinxin shu <xinxin.shu@intel.com>
Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Nov 25, 2015
1 parent 180c874 commit 528eae9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/osd/ReplicatedPG.cc
Expand Up @@ -2259,8 +2259,9 @@ bool ReplicatedPG::maybe_promote(ObjectContextRef obc,
if (count) {
// Check if in other hit sets
const hobject_t& oid = obc.get() ? obc->obs.oi.soid : missing_oid;
for (map<time_t,HitSetRef>::iterator itor = agent_state->hit_set_map.begin();
itor != agent_state->hit_set_map.end();
for (map<time_t,HitSetRef>::reverse_iterator itor =
agent_state->hit_set_map.rbegin();
itor != agent_state->hit_set_map.rend();
++itor) {
if (!itor->second->contains(oid)) {
break;
Expand Down

0 comments on commit 528eae9

Please sign in to comment.