summaryrefslogtreecommitdiff
path: root/src/osd/ReplicatedPG.cc
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-12-01 19:15:18 -0800
committerSage Weil <sage@inktank.com>2012-12-01 22:41:27 -0800
commitc10958e4fb32de49166c5ab09b59e83521672927 (patch)
tree5a95c83007139c5dee501d7189e59801df043e04 /src/osd/ReplicatedPG.cc
parentdccf6ee4d577214af41963bec2becfe5fab1d41e (diff)
downloadceph-c10958e4fb32de49166c5ab09b59e83521672927.tar.gz
osd: fix RepModify when past last_peering_reset
If we apply or commit a RepModify from a prevous perring interval, we need to free it. This fixes 'slow request' messages when in fact clients requests are not delayed, and plugs the related memory leak. Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'src/osd/ReplicatedPG.cc')
-rw-r--r--src/osd/ReplicatedPG.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index e66c77e2f78..6688fe14790 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -4614,6 +4614,7 @@ void ReplicatedPG::sub_op_modify_applied(RepModify *rm)
{
lock();
rm->op->mark_event("sub_op_applied");
+ rm->applied = true;
if (rm->epoch_started >= last_peering_reset) {
dout(10) << "sub_op_modify_applied on " << rm << " op " << *rm->op->request << dendl;
@@ -4627,8 +4628,6 @@ void ReplicatedPG::sub_op_modify_applied(RepModify *rm)
osd->cluster_messenger->send_message(ack, get_osdmap()->get_cluster_inst(rm->ackerosd));
}
- rm->applied = true;
-
assert(info.last_update >= m->version);
assert(last_update_applied < m->version);
last_update_applied = m->version;
@@ -4657,7 +4656,7 @@ void ReplicatedPG::sub_op_modify_commit(RepModify *rm)
{
lock();
rm->op->mark_event("sub_op_commit");
-
+ rm->committed = true;
if (rm->epoch_started >= last_peering_reset) {
// send commit.
@@ -4672,8 +4671,6 @@ void ReplicatedPG::sub_op_modify_commit(RepModify *rm)
commit->set_priority(CEPH_MSG_PRIO_HIGH); // this better match ack priority!
osd->cluster_messenger->send_message(commit, get_osdmap()->get_cluster_inst(rm->ackerosd));
}
-
- rm->committed = true;
} else {
dout(10) << "sub_op_modify_commit " << rm << " op " << *rm->op->request
<< " from epoch " << rm->epoch_started << " < last_peering_reset "