kamalcph commented on code in PR #17659:
URL: https://github.com/apache/kafka/pull/17659#discussion_r1830348952


##########
storage/api/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteLogMetadataManager.java:
##########
@@ -209,4 +209,18 @@ void onPartitionLeadershipChanges(Set<TopicIdPartition> 
leaderPartitions,
      * @return Total size of the log stored in remote storage in bytes.
      */
     long remoteLogSize(TopicIdPartition topicIdPartition, int leaderEpoch) 
throws RemoteStorageException;
+
+    /**
+     * Returns the next segment that contains the aborted txn entries for the 
given topic partition, epoch and offset.
+     * @param topicIdPartition topic partition to search for the next segment.
+     * @param epoch leader epoch of the txn index.
+     * @param offset offset
+     * @return the segment metadata that contains the txn index if exists. 
Otherwise, returns {@link Optional#empty()}.
+     * @throws RemoteStorageException if there are any storage related errors 
occurred.
+     */
+    default Optional<RemoteLogSegmentMetadata> 
nextSegmentWithTxnIndex(TopicIdPartition topicIdPartition,

Review Comment:
   Can we take the docs change separately in the next PR? 



##########
storage/src/main/java/org/apache/kafka/storage/internals/log/TransactionIndex.java:
##########
@@ -194,6 +194,10 @@ public void sanityCheck() {
         }
     }
 
+    public boolean isEmpty() {

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: jira-unsubscr...@kafka.apache.org

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

Reply via email to