]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: clear out old missing_loc in issue_repop
authorNeha Ojha <nojha@redhat.com>
Fri, 16 Feb 2018 20:19:53 +0000 (12:19 -0800)
committerNeha Ojha <nojha@redhat.com>
Thu, 15 Mar 2018 18:13:34 +0000 (11:13 -0700)
Signed-off-by: Neha Ojha <nojha@redhat.com>
src/osd/PrimaryLogPG.cc

index abc713f0698ea5bbcb47bc8e9d569ed13555d399..2df6297b468d78d8cf60b08f5f15aec67f33bdc9 100644 (file)
@@ -10104,6 +10104,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<pg_shard_t> peers(missing_loc.get_locations(soid));
+  for (set<pg_shard_t>::iterator r = peers.begin();
+       r != peers.end();
+       ++r) {
+    pg_shard_t peer(*r);
+    missing_loc.remove_location(soid, peer);
+  }
+
   for (set<pg_shard_t>::const_iterator i = actingset.begin();
        i != actingset.end();
        ++i) {
@@ -10111,6 +10121,7 @@ void PrimaryLogPG::issue_repop(RepGather *repop, OpContext *ctx)
     if (!peer_missing[peer].is_missing(soid))
       missing_loc.add_location(soid, peer);
   }
+  dout(10) << __func__ << " missing_loc after: " << missing_loc.get_locations(soid) << dendl;
 
   pgbackend->submit_transaction(
     soid,