From: Sage Weil Date: Fri, 12 Jul 2013 00:45:46 +0000 (-0700) Subject: mon: fix off-by-one: no need to reapply previous last_committed after sync X-Git-Tag: v0.67-rc1~59^2~20^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e019dd04972f63633f68edb40aa3a97dd6a78693;p=ceph.git mon: fix off-by-one: no need to reapply previous last_committed after sync The old last_committed is already committed; don't reapply. This also fixes the case where lc was 0 (i.e., we did get_cookie_recent from the beginning of time). Signed-off-by: Sage Weil --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index a1959a08c89e..211b1a5d0ceb 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -1144,7 +1144,7 @@ void Monitor::handle_sync_chunk(MMonSync *m) if (!sync_full) { dout(10) << __func__ << " applying recent paxos transactions as we go" << dendl; MonitorDBStore::Transaction tx; - paxos->read_and_prepare_transactions(&tx, paxos->get_version(), m->last_committed); + paxos->read_and_prepare_transactions(&tx, paxos->get_version() + 1, m->last_committed); tx.put(paxos->get_name(), "last_committed", m->last_committed); dout(30) << __func__ << " tx dump:\n";