]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
PrimaryLogPG::failed_push: update missing as well
authorSamuel Just <sjust@redhat.com>
Tue, 10 Jan 2017 02:48:28 +0000 (18:48 -0800)
committerSamuel Just <sjust@redhat.com>
Tue, 10 Jan 2017 02:48:31 +0000 (18:48 -0800)
This way, pick_newest_available should do the right thing.

Fixes: http://tracker.ceph.com/issues/18165
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/PG.h
src/osd/PrimaryLogPG.cc

index 68e0840ab04375b86677965d4b25bb49cc7eb306..5bb439f01f44b9affe106ad4cb948cf514b59e5b 100644 (file)
@@ -424,6 +424,12 @@ public:
       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);
 
index fbd5fa4f00b712b7782f3973ed3d24b935c0e2c8..05b450ec9d6c3585ad2616ee7d0be389dc59d415 100644 (file)
@@ -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;