brandboat commented on code in PR #16790:
URL: https://github.com/apache/kafka/pull/16790#discussion_r1706908628


##########
core/src/main/scala/kafka/log/UnifiedLog.scala:
##########
@@ -1576,7 +1576,10 @@ class UnifiedLog(@volatile var logStartOffset: Long,
     val startMs = time.milliseconds
 
     def shouldDelete(segment: LogSegment, nextSegmentOpt: Option[LogSegment]): 
Boolean = {
-      startMs - segment.largestTimestamp > retentionMs
+      val largestTimestamp = segment.largestTimestamp
+      val shouldDelete = startMs - largestTimestamp > retentionMs
+      debug(s"$segment retentionMs breached: $shouldDelete, startMs=$startMs, 
largestTimestamp=$largestTimestamp, retentionMs=$retentionMs")

Review Comment:
   You are right, thanks.



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