From d25ad0cfa4deebbdda444dd48fd51d8affbfe0ac Mon Sep 17 00:00:00 2001 From: Neha Ojha Date: Wed, 21 Feb 2018 08:40:48 -0800 Subject: [PATCH] PG: clear missing_loc only during async_recovery Signed-off-by: Neha Ojha --- src/osd/PrimaryLogPG.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 7f9bd5cdb08f..a568320e396d 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10107,16 +10107,16 @@ void PrimaryLogPG::issue_repop(RepGather *repop, OpContext *ctx) } dout(10) << __func__ << " missing_loc before: " << missing_loc.get_locations(soid) << dendl; - // clear out missing_loc - set peers(missing_loc.get_locations(soid)); - for (set::iterator r = peers.begin(); - r != peers.end(); - ++r) { - pg_shard_t peer(*r); - missing_loc.remove_location(soid, peer); - } if (requires_missing_loc) { + // clear out missing_loc + set peers(missing_loc.get_locations(soid)); + for (set::iterator r = peers.begin(); + r != peers.end(); + ++r) { + pg_shard_t peer(*r); + missing_loc.remove_location(soid, peer); + } for (set::const_iterator i = actingset.begin(); i != actingset.end(); ++i) { -- 2.47.3