summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-09-01 14:18:28 -0700
committerSamuel Just <sam.just@inktank.com>2013-09-23 22:54:58 -0700
commita744ebfb2e3f32d9339b35af1153cf50c68be3cc (patch)
tree41fef5fd7f970b9c7e47abb5992fc1470a7de87a
parentec913507252f772d8ef4277c5859cad0d4136141 (diff)
downloadceph-a744ebfb2e3f32d9339b35af1153cf50c68be3cc.tar.gz
ReplicatedPG/Backend: move over _failed_push
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/osd/ReplicatedBackend.h2
-rw-r--r--src/osd/ReplicatedPG.cc11
-rw-r--r--src/osd/ReplicatedPG.h1
3 files changed, 10 insertions, 4 deletions
diff --git a/src/osd/ReplicatedBackend.h b/src/osd/ReplicatedBackend.h
index e705bb9108c..fa679a2069c 100644
--- a/src/osd/ReplicatedBackend.h
+++ b/src/osd/ReplicatedBackend.h
@@ -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) {}
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index dd3ae41b53c..af664016a09 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -6914,8 +6914,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
@@ -6928,9 +6929,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);
}
diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h
index a92f6c95c54..ed94d2f6f44 100644
--- a/src/osd/ReplicatedPG.h
+++ b/src/osd/ReplicatedPG.h
@@ -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;