showuon commented on code in PR #16653:
URL: https://github.com/apache/kafka/pull/16653#discussion_r1689734247


##########
core/src/main/scala/kafka/log/UnifiedLog.scala:
##########
@@ -183,17 +184,18 @@ class UnifiedLog(@volatile var logStartOffset: Long,
   }
 
   def updateLogStartOffsetFromRemoteTier(remoteLogStartOffset: Long): Unit = {
-    if (!remoteLogEnabled()) {
-      error("Ignoring the call as the remote log storage is disabled")
-      return
-    }
     maybeIncrementLogStartOffset(remoteLogStartOffset, 
LogStartOffsetIncrementReason.SegmentDeletion)
   }
 
   def remoteLogEnabled(): Boolean = {
     UnifiedLog.isRemoteLogEnabled(remoteStorageSystemEnable, config, 
topicPartition.topic())
   }
 
+  def remoteLogEnabledOrRetainPolicy(): Boolean = {

Review Comment:
   Updated in 
https://github.com/apache/kafka/pull/16653/commits/2bc9b0bca64fb48c448fc7141af20480be00e230.
 I did:
   1. rename the method to `canReadRemoteStorage`
   2. make the `LSO < LLSO` as a must condition because this is only used when 
`handleOffsetOutOfRangeError` method to check if remote log available.



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