From 90b7952b41ecc02ab0f457ad9383cfba8fed0cc5 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 15 May 2008 07:36:36 -0700 Subject: [PATCH] paxos: invalidate lease in handle_commit, because we're paranoid --- src/mon/Paxos.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index b22f223aaf527..87e957bdae2fe 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -385,6 +385,11 @@ void Paxos::commit() { dout(10) << "commit " << last_committed+1 << dendl; + // cancel lease - it was for the old value. + // (this would only happen if message layer lost the 'begin', but + // leader still got a majority and committed with out us.) + lease_expire = utime_t(); // cancel lease + // commit locally last_committed++; mon->store->put_int(last_committed, machine_name, "last_committed"); -- 2.39.5