divijvaidya commented on code in PR #13923: URL: https://github.com/apache/kafka/pull/13923#discussion_r1245118305
########## storage/api/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteStorageManager.java: ########## @@ -107,20 +110,22 @@ InputStream fetchLogSegment(RemoteLogSegmentMetadata remoteLogSegmentMetadata, * @param endPosition end position of log segment to be read, inclusive. * @return input stream of the requested log segment data. * @throws RemoteStorageException if there are any errors while fetching the desired segment. - * @throws RemoteResourceNotFoundException when there are no resources associated with the given remoteLogSegmentMetadata. + * @throws RemoteResourceNotFoundException the requested log segment is not found in the remote storage. */ InputStream fetchLogSegment(RemoteLogSegmentMetadata remoteLogSegmentMetadata, int startPosition, int endPosition) throws RemoteStorageException; /** * Returns the index for the respective log segment of {@link RemoteLogSegmentMetadata}. + * <p> + * If the index is not present (e.g. Transaction index may not exist), throws {@link RemoteResourceNotFoundException} Review Comment: Perhaps, we can be more descriptive here. My suggestion is to add the following (free free to change the wording): `e.g. Transaction index may not exist because segments create prior to version 2.8.0 will not have transaction index associated with them.` `@throws RemoteResourceNotFoundException the requested index is not found in the remote storage. The caller of this function are encouraged to re-create the indexes from the segment as the suggested way of handling this error.` -- 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