diff options
author | Samuel Just <sam.just@inktank.com> | 2013-09-01 14:18:28 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-09-19 12:50:45 -0700 |
commit | 34a265442edc9f76d9c4a3976f6e0ffc94aa0aab (patch) | |
tree | fdb36236ecad973aca40a51987a9aa8cd4e9eb6b | |
parent | a03711018e2b0170639bd8f6045122a1ba10afb3 (diff) | |
download | ceph-34a265442edc9f76d9c4a3976f6e0ffc94aa0aab.tar.gz |
ReplicatedPG/Backend: move over _failed_push
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r-- | src/osd/ReplicatedBackend.h | 2 | ||||
-rw-r--r-- | src/osd/ReplicatedPG.cc | 11 | ||||
-rw-r--r-- | src/osd/ReplicatedPG.h | 1 |
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 7aaad536c7f..4c455c9864e 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -6909,8 +6909,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 @@ -6923,9 +6924,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; |