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>
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();