cmccabe commented on a change in pull request #11084:
URL: https://github.com/apache/kafka/pull/11084#discussion_r672716954



##########
File path: 
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java
##########
@@ -651,20 +661,21 @@ public void 
handleCommit(BatchReader<ApiMessageAndVersion> reader) {
                             // If we are writing a new snapshot, then we need 
to keep that around;
                             // otherwise, we should delete up to the current 
committed offset.
                             snapshotRegistry.deleteSnapshotsUpTo(
-                                Math.min(offset, 
snapshotGeneratorManager.snapshotLastOffsetFromLog()));
+                                
snapshotGeneratorManager.snapshotLastOffsetFromLog().orElse(offset)

Review comment:
       newline not needed here

##########
File path: 
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java
##########
@@ -651,20 +661,21 @@ public void 
handleCommit(BatchReader<ApiMessageAndVersion> reader) {
                             // If we are writing a new snapshot, then we need 
to keep that around;
                             // otherwise, we should delete up to the current 
committed offset.
                             snapshotRegistry.deleteSnapshotsUpTo(
-                                Math.min(offset, 
snapshotGeneratorManager.snapshotLastOffsetFromLog()));
+                                
snapshotGeneratorManager.snapshotLastOffsetFromLog().orElse(offset)

Review comment:
       extra newline not needed here




-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to