From: Sage Weil Date: Tue, 23 Jul 2013 20:32:12 +0000 (-0700) Subject: mon/OSDMonitor: fix base case for 7fb3804fb workaround X-Git-Tag: v0.61.6~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=38c3271d3fc415919f0856398bd94eb87a0776b5;p=ceph.git mon/OSDMonitor: fix base case for 7fb3804fb workaround After cluster creation, we have no full map stored and first_committed == 1. In that case, there is no need for a full map, since we can get there from OSDMap() and the incrementals. Backport: cuttlefish Signed-off-by: Sage Weil Reviewed-by: Joao Eduardo Luis (cherry picked from commit e807770784175b05130bba938113fdbf874f152e) --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 7ecb49d296a..20d162f3b00 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -127,7 +127,8 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap) if (latest_full == 0 && get_first_committed() > 1) latest_full = get_first_committed(); - if (latest_full < get_first_committed()) { + if (get_first_committed() > 1 && + latest_full < get_first_committed()) { /* a bug introduced in 7fb3804fb860dcd0340dd3f7c39eec4315f8e4b6 would lead * us to not update the on-disk latest_full key. Upon trim, the actual * version would cease to exist but we would still point to it. This