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


##########
storage/api/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteStorageManager.java:
##########
@@ -121,14 +121,17 @@ InputStream fetchLogSegment(RemoteLogSegmentMetadata 
remoteLogSegmentMetadata,
 
     /**
      * Returns the index for the respective log segment of {@link 
RemoteLogSegmentMetadata}.
+     * <p>
+     * Note: The transaction index may not exist because segments created 
prior to version 2.8.0 or non-transactional topics...etc.
+     * In this case, it should still return an InputStream with empty content, 
instead of returning {@code null}.
      *
      * @param remoteLogSegmentMetadata metadata about the remote log segment.
      * @param indexType                type of the index to be fetched for the 
segment.
      * @return input stream of the requested index.
      * @throws RemoteStorageException          if there are any errors while 
fetching the index.
      * @throws RemoteResourceNotFoundException the requested index is not 
found in the remote storage
-     * (e.g. Transaction index may not exist because segments created prior to 
version 2.8.0 will not have transaction index associated with them.).
-     * The caller of this function are encouraged to re-create the indexes 
from the segment

Review Comment:
   Good to remove this line. 



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