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>
(cherry picked from commit 528eae9)

Conflicts:
	src/osd/ReplicatedPG.cc
                    code section was moved to ReplicatedPG::maybe_promote
                    in master.
Signed-off-by: Robert LeBlanc <robert.leblanc@endurance.com>
  • Loading branch information
liewegas authored and Robert LeBlanc committed Jan 29, 2016
1 parent 5cefcb9 commit ae56de0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/osd/ReplicatedPG.cc
Expand Up @@ -1860,8 +1860,9 @@ bool ReplicatedPG::maybe_handle_cache(OpRequestRef op,
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 ae56de0

Please sign in to comment.