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

Sagar Rao commented on KAFKA-12373:
-----------------------------------

hi [~jsancio], I have started looking at this and had a question:

There is already a mechanism for GracefulShutdown and then there areĀ  close 
semantics in the KafkaRaftClient. In your Ticket title, you talk about graceful 
shutdown but in the description you say only metrics groups are closed. So, 
this behaviour on shutdown that you have described, needs to be added in 
shutdown/close or both?

The reason i ask is that in the point #4 mentioned by you indicates that you 
want to trigger a Graceful shutdown, while in the javadocs for shutdown method 
in RaftClient, it is mentioned that it shouldn't be invoked in case of any 
exceptions. Effectively, all shutdown does is trigger a GracefulShutdown, so it 
is slightly confusing for me.

> Improve KafkaRaftClient handling of graceful shutdown
> -----------------------------------------------------
>
>                 Key: KAFKA-12373
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12373
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: replication
>            Reporter: Jose Armando Garcia Sancio
>            Assignee: Sagar Rao
>            Priority: Major
>
> The current implementation simply closes the metrics group when it is closed.
> When closing the KafkaRaftClient that is the leader it should perform at 
> least the following steps:
>  # Stop accepting new schedule append operations
>  # Append to the log the batches currently in the BatchAccumulator
>  # Wait with a timeout for the high-watermark to reach the LEO
>  # Cooperatively resign as leader from the quorum



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

Reply via email to