junrao commented on code in PR #18861:
URL: https://github.com/apache/kafka/pull/18861#discussion_r1990146496


##########
storage/src/test/java/org/apache/kafka/tiered/storage/integration/BaseDeleteSegmentsTest.java:
##########
@@ -55,7 +56,7 @@ protected void 
writeTestSpecifications(TieredStorageTestBuilder builder) {
                 .expectSegmentToBeOffloaded(broker0, topicA, p0, 2, new 
KeyValueSpec("k2", "v2"))
                 .expectEarliestLocalOffsetInLogDirectory(topicA, p0, 3L)
                 .produceWithTimestamp(topicA, p0, new KeyValueSpec("k0", 
"v0"), new KeyValueSpec("k1", "v1"),
-                        new KeyValueSpec("k2", "v2"), new KeyValueSpec("k3", 
"v3", System.currentTimeMillis()))
+                        new KeyValueSpec("k2", "v2"), new KeyValueSpec("k3", 
"v3", System.currentTimeMillis() + TimeUnit.HOURS.toMillis(1)))

Review Comment:
   When remote storage is enabled, we will roll a segment subject for deletion 
due to retention. This could eventually lead to the tiering and the deletion of 
the segment.
   
   ```
           // Roll the active segment when it breaches the configured retention 
policy. The rolled segment will be
           // eligible for deletion and gets removed in the next iteration.
           if (predicateResult && remoteLogEnabled() && nextSegmentOpt.isEmpty 
&& segment.size > 0) {
             shouldRoll = true
           }
   ```



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