cmccabe commented on code in PR #17146:
URL: https://github.com/apache/kafka/pull/17146#discussion_r1776104765
##########
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:
Let's get rid of this line which isn't needed:
```
// The active controller can delete up to the current committed offset.
snapshotRegistry.deleteSnapshotsUpTo(offsetControl.lastStableOffset());
```
since that is already done in `OffsetsControlManager.handleCommitBatch`.
--
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]