cmccabe commented on code in PR #17146:
URL: https://github.com/apache/kafka/pull/17146#discussion_r1776103853


##########
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java:
##########
@@ -1065,6 +1065,11 @@ public void 
handleCommit(BatchReader<ApiMessageAndVersion> reader) {
                         int epoch = batch.epoch();
                         List<ApiMessageAndVersion> messages = batch.records();
 
+                        if (messages.isEmpty()) {
+                            log.debug("Skipping handling commit for batch with 
no data records with offset {} and epoch {}.", offset, epoch);
+                            continue;

Review Comment:
   `continue` is kind of a messy construct. Can we do something like this 
instead?
   ```
   if (messages.isEmpty()) {
       log.debug("Skipping handling commit for batch with no data records with 
offset {} and epoch {}.", offset, epoch);
   } else if (isActive) {
   ...
   ```



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to