You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jason Gustafson (Jira)" <ji...@apache.org> on 2021/06/22 22:14:00 UTC

[jira] [Commented] (KAFKA-12982) Notify listeners of raft client shutdowns

    [ https://issues.apache.org/jira/browse/KAFKA-12982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17367713#comment-17367713 ] 

Jason Gustafson commented on KAFKA-12982:
-----------------------------------------

The `shutdown` API is mainly about graceful leaving the cluster while `close` is used to clean up any resources owned by the client. I could probably be convinced otherwise, but my initial intuition is that we want to keep the listeners around as long as we continue to participate in the cluster. So maybe we can fire `Listener.beginShutdown` (or just `Listener.shutdown`?) when graceful shutdown completes. 

> Notify listeners of raft client shutdowns
> -----------------------------------------
>
>                 Key: KAFKA-12982
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12982
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Jose Armando Garcia Sancio
>            Priority: Major
>
> `RaftClient.Listener.beginShutdown` should be called when the `RaftClient` is shutting down. I think there should be two ways to terminate the `RaftClient`. Those are `shutdown` and `close`.
> It looks like the current code for `close` only closes the metrics registry. It doesn't notify the listeners that the raft client was close. It doesn't stop future `poll` from updating the raft client.
> There is also an assumption that `shutdown` can only be called once. I think to satisfy this we should remove this method from `RaftClient` and keep it as implementation method in `KafkaRaftClient`.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)