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

[GitHub] [kafka] showuon commented on a diff in pull request #14352: MINOR: update the javadoc in RSM

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


##########
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:
   I don't believe we expect the _caller_ do anything after getting the index, since the caller are all internal methods.



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