From: Sage Weil Date: Wed, 29 May 2013 20:16:24 +0000 (-0700) Subject: osd: avoid duplicate mon requests for a new osdmap X-Git-Tag: v0.65~192^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c093e5bf91fff914281f9957fa473e8a89b19df3;p=ceph.git osd: avoid duplicate mon requests for a new osdmap sub_want() returns true if this is a new sub; only renew then. Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 5c8457ac4751..5aad94c272ed 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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; }