summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-05-29 13:16:24 -0700
committerSage Weil <sage@inktank.com>2013-05-29 13:41:44 -0700
commitc093e5bf91fff914281f9957fa473e8a89b19df3 (patch)
treed49e67e5de6d5d8181311ae1ebf9626dd780f08c
parentaac828c2ecb90f46d37862d71092171c03bb16d3 (diff)
downloadceph-c093e5bf91fff914281f9957fa473e8a89b19df3.tar.gz
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 <sage@inktank.com>
-rw-r--r--src/osd/OSD.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc
index 5c8457ac475..5aad94c272e 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;
}