summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-09-04 17:08:48 -0700
committerSage Weil <sage@inktank.com>2013-09-11 15:56:12 -0700
commit25a608cdccaf667f465f44c9776ca0f8a132cece (patch)
tree5a2389acd7f57a072fea24208b7d08bbfee85ce8
parent155cdd29a332339f5a1da65b2d8b4ad589393b41 (diff)
downloadceph-25a608cdccaf667f465f44c9776ca0f8a132cece.tar.gz
osd/ReplicatedPG: allow RepGathers with no version
If the repop has no version set, skip the updates to last_update and last_update_{applied,ondisk} and last_complete_ondisk. Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/osd/ReplicatedPG.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index 677e9fb6a48..ae1c38e4aef 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -4319,9 +4319,11 @@ void ReplicatedPG::op_applied(RepGather *repop)
repop->waitfor_disk.count(whoami) == 0); // commit before ondisk
repop->waitfor_ack.erase(whoami);
- assert(info.last_update >= repop->v);
- assert(last_update_applied < repop->v);
- last_update_applied = repop->v;
+ if (repop->v != eversion_t()) {
+ assert(info.last_update >= repop->v);
+ assert(last_update_applied < repop->v);
+ last_update_applied = repop->v;
+ }
// chunky scrub
if (scrubber.active && scrubber.is_chunky) {
@@ -4368,9 +4370,10 @@ void ReplicatedPG::op_commit(RepGather *repop)
// is no separate reply sent.
repop->waitfor_ack.erase(whoami);
- last_update_ondisk = repop->v;
-
- last_complete_ondisk = repop->pg_local_last_complete;
+ if (repop->v != eversion_t()) {
+ last_update_ondisk = repop->v;
+ last_complete_ondisk = repop->pg_local_last_complete;
+ }
eval_repop(repop);
}
@@ -5260,9 +5263,11 @@ void ReplicatedPG::sub_op_modify_applied(RepModify *rm)
osd->send_message_osd_cluster(rm->ackerosd, ack, get_osdmap()->get_epoch());
}
- assert(info.last_update >= m->version);
- assert(last_update_applied < m->version);
- last_update_applied = m->version;
+ if (m->version != eversion_t()) {
+ assert(info.last_update >= m->version);
+ assert(last_update_applied < m->version);
+ last_update_applied = m->version;
+ }
if (scrubber.active_rep_scrub) {
if (last_update_applied == scrubber.active_rep_scrub->scrub_to) {
osd->rep_scrub_wq.queue(scrubber.active_rep_scrub);