]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/Mgr: kill redundant sub_unwant call 26950/head
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)
commit8665a892f6eb5ab7afd19888fe266e9f8bc395d9
tree307ba90499858bf33cc0d97cb62878b970d838b2
parent9c024bafa3570dee401d3fcaf04754376f285eca
mgr/Mgr: kill redundant sub_unwant call

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