dielhennr commented on a change in pull request #10480: URL: https://github.com/apache/kafka/pull/10480#discussion_r610269446
########## File path: raft/src/main/java/org/apache/kafka/raft/internals/BatchAccumulator.java ########## @@ -202,6 +203,25 @@ private void completeCurrentBatch() { currentBatch = null; } + public void addControlBatch(MemoryRecords records) { + appendLock.lock(); + try { + drainStatus = DrainStatus.STARTED; + completed.add(new CompletedBatch<>( + nextOffset, + null, Review comment: In constructor I used `Optional.ofNullable(records);`. I will change it so it reads easier. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org