You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jose Armando Garcia Sancio (Jira)" <ji...@apache.org> on 2021/03/11 17:38:00 UTC

[jira] [Commented] (KAFKA-12265) Move the BatchAccumulator in KafkaRaftClient to LeaderState

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

Jose Armando Garcia Sancio commented on KAFKA-12265:
----------------------------------------------------

{quote}Just curious why we need this move? Could you elaborate a bit more on the description?
{quote}
I missed this [~guozhang] . Excuse the delay response. I updated the description. Let me know if that helps.

> Move the BatchAccumulator in KafkaRaftClient to LeaderState
> -----------------------------------------------------------
>
>                 Key: KAFKA-12265
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12265
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Jose Armando Garcia Sancio
>            Priority: Major
>
> The {{KafkaRaftClient}} has a field for the {{BatchAccumulator}} that is only used and set when it is the leader. In other cases, leader specific information was stored in {{LeaderState}}. In a recent change {{EpochState}}, which {{LeaderState}} implements, was changed to be a {{Closable}}. {{QuorumState}} makes sure to always close the previous state before transitioning to the next state. We can use this redesign to move the {{BatchAccumulator}} to the {{LeaderState}} and simplify some of the handling in {{KafkaRaftClient}}.



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