dielhennr commented on a change in pull request #10480: URL: https://github.com/apache/kafka/pull/10480#discussion_r610280789
########## 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: If `Optional.empty` is used, the type argument can not be inferred for CompletedBatch. I got around this by using `Optional.ofNullable` in the constructor of CompletedBatch. -- 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