]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
paxos: invalidate lease in handle_commit, because we're paranoid
authorSage Weil <sage@newdream.net>
Thu, 15 May 2008 14:36:36 +0000 (07:36 -0700)
committerSage Weil <sage@newdream.net>
Sat, 17 May 2008 02:34:48 +0000 (19:34 -0700)
src/mon/Paxos.cc

index b22f223aaf5272b35458987c670bfc062eb85df9..87e957bdae2fe1dfec9c4b17b95675e7f8be94c4 100644 (file)
@@ -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");