[ https://issues.apache.org/jira/browse/KAFKA-17339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888151#comment-17888151 ]
Peter Lee commented on KAFKA-17339: ----------------------------------- I'd like to share my understanding of this problem to check if I've understood it correctly. LocalLogManager is somewhat like a mock of KafkaRaftClient. When controllerWriteEvent writes to the leader controller, it calls raftClient.prepareAppend(controllerEpoch, records), allowing the raftClient to put the events into an in-memory batch buffer. It's important to note that if an event is marked as atomic, it won't be split according to max_batch_size; otherwise, it will be. After everything is put into the batch buffer, it calls schedulePrepareAppend to let the raftClient's poller actually consume the contents of the batch buffer and start replicating them. Currently, LocalLogManager doesn't implement schedulePrepareAppend. It directly inserts the batch into the batch store during prepareAppend (although this batch store is directly implemented using Map<int, record[]> for testing the batch buffer). This task wants LocalLogManager to have the same semantics as raftClient when inserting events. So I should just add some kind of buffer, then have LocalLogManager.prepareAppend() put things into the buffer, and then LocalLogManager.scheduleprepareAppend() take things out of the buffer and put them into the batch store. > LocalLogManager should support RaftClient#schedulePreparedAppend > ---------------------------------------------------------------- > > Key: KAFKA-17339 > URL: https://issues.apache.org/jira/browse/KAFKA-17339 > Project: Kafka > Issue Type: Sub-task > Reporter: José Armando García Sancio > Priority: Major > -- This message was sent by Atlassian Jira (v8.20.10#820010)