mirror of
https://github.com/ceph/ceph
synced 2025-03-06 08:20:12 +00:00
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 <sage@inktank.com>
This commit is contained in:
parent
e213b1bc25
commit
e019dd0497
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user