From 290ccde1dc5fb3fbc7356022d8b813798feacc00 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 25 Jun 2013 16:45:05 -0700 Subject: [PATCH] mon/Paxos: set first_committed on first commit Signed-off-by: Sage Weil --- src/mon/Paxos.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index 77baef40503..bbb488684c4 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -491,6 +491,10 @@ void Paxos::begin(bufferlist& v) MonitorDBStore::Transaction t; t.put(get_name(), last_committed+1, new_value); + // initial base case; set first_committed too + if (last_committed == 0) + t.put(get_name(), "first_committed", 1); + dout(30) << __func__ << " transaction dump:\n"; JSONFormatter f(true); t.dump(&f); -- 2.47.3