From: Sage Weil Date: Thu, 5 Sep 2013 00:08:48 +0000 (-0700) Subject: osd/ReplicatedPG: allow RepGathers with no version X-Git-Tag: v0.71~119^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=25a608cdccaf667f465f44c9776ca0f8a132cece;p=ceph.git 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 --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 677e9fb6a483..ae1c38e4aef5 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);