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-26 11:24:26 -0700 |
commit | c1c2debdb9240ea2cfe89e41e3af88af41176c48 (patch) | |
tree | 33902a65d57d330ddf7d6225f523aa7281d800cd | |
parent | f9810797afda85525fe7d683f6f483881529db81 (diff) | |
download | ceph-c1c2debdb9240ea2cfe89e41e3af88af41176c48.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 dd2755debee..718a8ac1d5e 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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); } diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index fcbb2d58dc4..80ffcc51029 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; |