]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG/Backend: move over _failed_push
authorSamuel Just <sam.just@inktank.com>
Sun, 1 Sep 2013 21:18:28 +0000 (14:18 -0700)
committerSamuel Just <sam.just@inktank.com>
Thu, 26 Sep 2013 18:24:26 +0000 (11:24 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedBackend.h
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

index e705bb9108c6b005dd0bdb323f6a1fb186062231..fa679a2069cdfd3635fdf201fae7f4197bf0203c 100644 (file)
@@ -228,7 +228,7 @@ private:
                               bufferlist data_received,
                               interval_set<uint64_t> *intervals_usable,
                               bufferlist *data_usable);
-  void _failed_push(int from, const hobject_t &soid) {}
+  void _failed_push(int from, const hobject_t &soid);
 
   void send_pushes(int prio, map<int, vector<PushOp> > &pushes) {}
   void prep_push_op_blank(const hobject_t& soid, PushOp *op) {}
index dd2755debee014c88373bc85d35dddd9bb43e07e..718a8ac1d5ed50ac60649f120d0889cb6174faff 100644 (file)
@@ -6922,8 +6922,9 @@ void ReplicatedBackend::sub_op_push(OpRequestRef op)
   return;
 }
 
-void ReplicatedPG::_failed_push(int from, const hobject_t &soid)
+void ReplicatedPG::failed_push(int from, const hobject_t &soid)
 {
+  // TODOSAM: this will need to update recovering
   map<hobject_t,set<int> >::iterator p = missing_loc.find(soid);
   if (p != missing_loc.end()) {
     dout(0) << "_failed_push " << soid << " from osd." << from
@@ -6936,9 +6937,15 @@ void ReplicatedPG::_failed_push(int from, const hobject_t &soid)
     dout(0) << "_failed_push " << soid << " from osd." << from
            << " but not in missing_loc ???" << dendl;
   }
-
   finish_recovery_op(soid);  // close out this attempt,
+}
+
+void ReplicatedBackend::_failed_push(int from, const hobject_t &soid)
+{
+  get_parent()->failed_push(from, soid);
   pull_from_peer[from].erase(soid);
+  if (pull_from_peer[from].empty())
+    pull_from_peer.erase(from);
   pulling.erase(soid);
 }
 
index fcbb2d58dc4d6cb11e5d7d370300578bc0c18bb2..80ffcc51029aeb06c1f85c168e6d8da6942e439c 100644 (file)
@@ -839,7 +839,6 @@ protected:
   void _applied_recovered_object_replica();
   void _committed_pushed_object(epoch_t epoch, eversion_t lc);
   void recover_got(hobject_t oid, eversion_t v);
-  void _failed_push(int from, const hobject_t &soid);
 
   // -- copyfrom --
   map<hobject_t, CopyOpRef> copy_ops;