summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-01-04 12:43:52 -0800
committerSamuel Just <sam.just@inktank.com>2013-01-04 13:44:18 -0800
commite89b6ade63cdad315ab754789de24008cfe42b37 (patch)
tree04a85eb4b66cb6e5b3aa4c730ed042ca679906df
parent28d59d374b28629a230d36b93e60a8474c902aa5 (diff)
downloadceph-e89b6ade63cdad315ab754789de24008cfe42b37.tar.gz
ReplicatedPG: remove old-head optization from push_to_replica
This optimization allowed the primary to push a clone as a single push in the case that the head object on the replica is old and happens to be at the same version as the clone. In general, using head in clone_subsets is tricky since we might be writing to head during the push. calc_clone_subsets does not consider head (probably for this reason). Handling the clone from head case properly would require blocking writes on head in the interim which is probably a bad trade off anyway. Because the old-head optimization only comes into play if the replica's state happens to fall on the last write to head prior to the snap that caused the clone in question, it's not worth the complexity. Fixes: #3698 Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/osd/ReplicatedPG.cc12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index 59e055d5829..cbae003827c 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -5073,18 +5073,6 @@ void ReplicatedPG::push_to_replica(
if (soid.snap && soid.snap < CEPH_NOSNAP) {
hobject_t head = soid;
head.snap = CEPH_NOSNAP;
- if (peer_missing[peer].is_missing(head) &&
- peer_missing[peer].have_old(head) == oi.prior_version) {
- dout(10) << "push_to_replica osd." << peer << " has correct old " << head
- << " v" << oi.prior_version
- << ", pushing " << soid << " attrs as a clone op" << dendl;
- interval_set<uint64_t> data_subset;
- map<hobject_t, interval_set<uint64_t> > clone_subsets;
- if (size)
- clone_subsets[head].insert(0, size);
- push_start(prio, obc, soid, peer, oi.version, data_subset, clone_subsets);
- return;
- }
// try to base push off of clones that succeed/preceed poid
// we need the head (and current SnapSet) locally to do that.