]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/Mgr: kill redundant sub_unwant call
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 14 Mar 2019 07:20:17 +0000 (15:20 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 19 Mar 2019 08:00:22 +0000 (16:00 +0800)
Quote from Kefu:
sub_unwant() only helps if the subscription is not acked by monitor,
and MonClient is still alive, in that case MonClient will stop asking
monitor for the subscription. but once a subscription is added, we cannot
"undo" this without disconnect from monitor. so, to remove a sub in
MonClient is a no-op under most circumstances. i guess that's why we don't
call sub_unwant() elsewhere.
in this case, it's MgrStandby::shutdown() who starts the shutdown process.
it stops monc, mgrc, then stops Mgr. so when Mgr::stop() is executed,
MonClient is already disconnected.
the only use case of call sub_unwant() i can think of is rados_monitor_log().

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mgr/Mgr.cc

index 7cd6c91eb655d6e94ef6893ae112bcd6c3644886..60f42e20ea073b1196e0772adf30124d3c7e9050 100644 (file)
@@ -406,9 +406,6 @@ void Mgr::shutdown()
   finisher.queue(new FunctionContext([&](int) {
     {
       std::lock_guard l(lock);
-      monc->sub_unwant("log-info");
-      monc->sub_unwant("mgrdigest");
-      monc->sub_unwant("fsmap");
       // First stop the server so that we're not taking any more incoming
       // requests
       server.shutdown();