Re: Why need handle delete topic in topic change event

2021-11-01 Thread Colin McCabe
On Mon, Oct 11, 2021, at 03:06, 方晓兵 wrote: > Hi Team, > > I have a problem when I study kafka code in version 2.8.0. > > I see `controllerContext.removeTopic(topic)` have been called in > `TopicDeletionManager.completeDeleteTopic()`. TopicChangeHandler not > only listen to child delete but also

Re: Why need handle delete topic in topic change event

2021-10-11 Thread Luke Chen
Hi 晓兵, I know what you mean now. Yes, that makes sense to me, as long as you confirmed that each topic deletion, we'll put a znode under "delete_topics". Please open a jira ticket and welcome to submit PR. Thank you. Luke On Tue, Oct 12, 2021 at 10:32 AM 方晓兵 <94fxiaob...@gmail.com> wrote: > Hi

Re: Why need handle delete topic in topic change event

2021-10-11 Thread 方晓兵
Hi Luke, What I mean is whether there is no need to listen to the topic znode deletion event, because `controllerContext#removeTopic` has been actively called after deleting znode in `TopicDeletionManager.completeDeleteTopic()`. Is it better for TopicChangeHandler to only handle child add

Re: Why need handle delete topic in topic change event

2021-10-11 Thread Luke Chen
Hi 晓兵, Are you saying we should not call `removeTopic` because the topic znode is deleted? Have a quick look at the `controllerContext#removeTopic` implementation, it looks like we only clean up the metrics, and local maps. Why is it a problem we called it here? Does it caused any error? Could you

Why need handle delete topic in topic change event

2021-10-11 Thread 方晓兵
Hi Team, I have a problem when I study kafka code in version 2.8.0. I see `controllerContext.removeTopic(topic)` have been called in `TopicDeletionManager.completeDeleteTopic()`. TopicChangeHandler not only listen to child delete but also listen to child add. So every time a topic is

Why need handle delete topic in topic change event

2021-10-11 Thread 方晓兵
Hi Team, I have a problem when I study kafka code in version 2.8.0. I see `controllerContext.removeTopic(topic)` have been called in `TopicDeletionManager.completeDeleteTopic()`. TopicChangeHandler not only listen to child delete but also listen to child add. So every time a topic is