m1a2st commented on code in PR #20334:
URL: https://github.com/apache/kafka/pull/20334#discussion_r2290620056


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/UnifiedLog.java:
##########
@@ -1887,8 +1887,10 @@ public int deleteOldSegments() throws IOException {
             return deleteLogStartOffsetBreachedSegments() +
                     deleteRetentionSizeBreachedSegments() +
                     deleteRetentionMsBreachedSegments();
-        } else {
+        } else if (config().compact) {
             return deleteLogStartOffsetBreachedSegments();
+        } else {
+            return deleteLogStartOffsetBreachedSegments() + 
deleteRetentionSizeBreachedSegments();

Review Comment:
   > If cleanup.policy is empty, we want to ignore log.retention.bytes and 
log.retention.ms and only pick up > log.local.retention.bytes and 
log.local.retention.ms if remote storage is enabled.
   
   There is a validation that checks whether cleanup.policy contains only the 
value delete when remote storage is enabled. I’m a bit confused about this 
scenario. 
   
   validation: 
https://github.com/apache/kafka/blob/0202721b4c175c606c3d079e602fe33e8faea018/storage/src/main/java/org/apache/kafka/storage/internals/log/LogConfig.java#L563



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