]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: avoid duplicate mon requests for a new osdmap
authorSage Weil <sage@inktank.com>
Wed, 29 May 2013 20:16:24 +0000 (13:16 -0700)
committerSage Weil <sage@inktank.com>
Wed, 29 May 2013 20:41:44 +0000 (13:41 -0700)
sub_want() returns true if this is a new sub; only renew then.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/OSD.cc

index 5c8457ac475121467ef51acbc5833a53e02821c2..5aad94c272ed97a658f16ad85025df3e23050d3e 100644 (file)
@@ -2485,8 +2485,8 @@ void OSD::handle_osd_ping(MOSDPing *m)
   case MOSDPing::YOU_DIED:
     dout(10) << "handle_osd_ping " << m->get_source_inst() << " says i am down in " << m->map_epoch
             << dendl;
-    monc->sub_want("osdmap", m->map_epoch, CEPH_SUBSCRIBE_ONETIME);
-    monc->renew_subs();
+    if (monc->sub_want("osdmap", m->map_epoch, CEPH_SUBSCRIBE_ONETIME))
+      monc->renew_subs();
     break;
   }