]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix off-by-one in map gap logic
authorSage Weil <sage@inktank.com>
Sun, 28 Jul 2013 15:55:38 +0000 (08:55 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 26 Aug 2013 21:14:13 +0000 (14:14 -0700)
If we have map 250, and monitor's first is 251, but sends 260, we can
request the intervening range.

Fixes: #5784
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit e24b50225c841a650d9303041bbe811e04bdd668)

src/osd/OSD.cc

index 0581f76c57812bfe7dbe2c1a7ee41a6752654e79..00d114d753d66dfe4c7a888103a53d68b32a8803 100644 (file)
@@ -4213,7 +4213,7 @@ void OSD::handle_osd_map(MOSDMap *m)
     dout(10) << "handle_osd_map message skips epochs " << osdmap->get_epoch() + 1
             << ".." << (first-1) << dendl;
     if ((m->oldest_map < first && osdmap->get_epoch() == 0) ||
-       m->oldest_map <= osdmap->get_epoch()) {
+       m->oldest_map <= osdmap->get_epoch() + 1) {
       monc->sub_want("osdmap", osdmap->get_epoch()+1, CEPH_SUBSCRIBE_ONETIME);
       monc->renew_subs();
       m->put();