satishd commented on code in PR #11390:
URL: https://github.com/apache/kafka/pull/11390#discussion_r1047020508


##########
core/src/test/scala/unit/kafka/log/UnifiedLogTest.scala:
##########
@@ -3474,6 +3535,57 @@ class UnifiedLogTest {
     // bound by the log end offset
     assertEquals(None, log.maybeUpdateHighWatermark(101L))
   }
+  def testEnableRemoteLogStorageOnCompactedTopics(): Unit = {

Review Comment:
   Done



##########
core/src/main/scala/kafka/log/UnifiedLog.scala:
##########
@@ -1280,6 +1308,14 @@ class UnifiedLog(@volatile var logStartOffset: Long,
           case _ => Optional.empty[Integer]()
         }
         Some(new TimestampAndOffset(RecordBatch.NO_TIMESTAMP, logStartOffset, 
epochOpt))
+      } else if (targetTimestamp == 
ListOffsetsRequest.EARLIEST_LOCAL_TIMESTAMP) {
+        val earliestLocalLogEpochEntry = leaderEpochCache.flatMap(cache =>
+          cache.epochForOffset(_localLogStartOffset).flatMap(cache.epochEntry))
+        val epochOpt = earliestLocalLogEpochEntry match {
+          case Some(entry) if entry.startOffset <= _localLogStartOffset => 
Optional.of[Integer](entry.epoch)
+          case _ => Optional.empty[Integer]()
+        }
+        Some(new TimestampAndOffset(RecordBatch.NO_TIMESTAMP, 
_localLogStartOffset, epochOpt))

Review Comment:
   Done



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