jsancio commented on a change in pull request #10480:
URL: https://github.com/apache/kafka/pull/10480#discussion_r611957903



##########
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;

Review comment:
       Okay. This is an internal API so I say we add this when needed. If we 
still want to refactor then, this is similar to `maybeCompleteDrain` but it 
cannot assume that the lock is held. How about naming this method 
`completeDrain`?




-- 
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


Reply via email to