]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: fix base case for 7fb3804fb workaround
authorSage Weil <sage@inktank.com>
Tue, 23 Jul 2013 20:32:12 +0000 (13:32 -0700)
committerSage Weil <sage@inktank.com>
Tue, 23 Jul 2013 20:32:58 +0000 (13:32 -0700)
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 <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao@inktank.com>
(cherry picked from commit e807770784175b05130bba938113fdbf874f152e)

src/mon/OSDMonitor.cc

index 7ecb49d296a977911c80b919581290d9ab3221e9..20d162f3b009178e26ff89589964f10961f614a8 100644 (file)
@@ -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