You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "FrankYang0529 (via GitHub)" <gi...@apache.org> on 2024/09/22 07:08:32 UTC

[PR] KAFKA-17552: Handle LIST_OFFSETS request for max_timestamp when remote storage is enabled [kafka]

FrankYang0529 opened a new pull request, #17248:
URL: https://github.com/apache/kafka/pull/17248

   
   
   *More detailed description of your change,
   if necessary. The PR title and PR message become
   the squashed commit message, so use a separate
   comment to ping reviewers.*
   
   *Summary of testing strategy (including rationale)
   for the feature or bug fix. Unit and/or integration
   tests are expected for any behaviour change and
   system tests should be considered for larger changes.*
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17552: Handle LIST_OFFSETS request for max_timestamp when remote storage is enabled [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17248:
URL: https://github.com/apache/kafka/pull/17248#issuecomment-2632742883

   This PR is being marked as stale since it has not had any activity in 90 days. If you
   would like to keep this PR alive, please leave a comment asking for a review. If the PR has 
   merge conflicts, update it with the latest from the base branch.
   <p>
   If you are having difficulty finding a reviewer, please reach out on the 
   [mailing list](https://kafka.apache.org/contact).
   <p>
   If this PR is no longer valid or desired, please feel free to close it. If no activity
   occurs in the next 30 days, it will be automatically closed.


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17552: Handle LIST_OFFSETS request for max_timestamp when remote storage is enabled [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17248:
URL: https://github.com/apache/kafka/pull/17248#issuecomment-6332154496

   This PR is being marked as stale since it has not had any activity in 90 days. If you
   would like to keep this PR alive, please leave a comment asking for a review. If the PR has 
   merge conflicts, update it with the latest from the base branch.
   <p>
   If you are having difficulty finding a reviewer, please reach out on the 
   [mailing list](https://kafka.apache.org/contact).
   <p>
   If this PR is no longer valid or desired, please feel free to close it. If no activity
   occurs in the next 30 days, it will be automatically closed.


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17552: Handle LIST_OFFSETS request for max_timestamp when remote storage is enabled [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #17248:
URL: https://github.com/apache/kafka/pull/17248#discussion_r1771227003


##########
core/src/main/java/kafka/log/remote/RemoteLogManager.java:
##########
@@ -709,6 +709,29 @@ && isRemoteSegmentWithinLeaderEpochs(rlsMetadata, unifiedLog.logEndOffset(), epo
         return Optional.empty();
     }
 
+    public Optional<FileRecords.TimestampAndOffset> findOffsetWithMaxTimestamp(TopicPartition tp) throws RemoteStorageException, IOException {

Review Comment:
   Could you please reuse `findOffsetByTimestamp`? the main difference is `findOffsetByTimestamp` will return early if there is a matched segment.



##########
core/src/main/scala/kafka/log/UnifiedLog.scala:
##########
@@ -1341,6 +1341,13 @@ class UnifiedLog(@volatile var logStartOffset: Long,
           .find(_.maxTimestamp() == maxTimestampSoFar.timestamp)
           .flatMap(batch => batch.offsetOfMaxTimestamp().asScala.map(new TimestampAndOffset(batch.maxTimestamp(), _,
             Optional.of[Integer](batch.partitionLeaderEpoch()).filter(_ >= 0))))
+
+        if (remoteLogEnabled()) {
+          val remoteTimestampAndOffsetOpt = remoteLogManager.get.findOffsetWithMaxTimestamp(topicPartition)

Review Comment:
   Please use async-read as this request has unknown latency. Also, please check the existence of `remoteLogManager`. see line#1354 ~ line#1364



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17552: Handle LIST_OFFSETS request for max_timestamp when remote storage is enabled [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17248:
URL: https://github.com/apache/kafka/pull/17248#issuecomment-2702713397

   This PR has been closed since it has not had any activity in 120 days. If you feel like this
   was a mistake, or you would like to continue working on it, please feel free to re-open the 
   PR and ask for a review.


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-17552: Handle LIST_OFFSETS request for max_timestamp when remote storage is enabled [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #17248: KAFKA-17552: Handle LIST_OFFSETS request for max_timestamp when remote storage is enabled
URL: https://github.com/apache/kafka/pull/17248


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org