stillalex commented on code in PR #2012: URL: https://github.com/apache/solr/pull/2012#discussion_r1360954968
########## solr/core/src/java/org/apache/solr/update/TransactionLog.java: ########## @@ -987,4 +1022,28 @@ public String toString() { + position(); } } + + /** Opens {@link OutputStream} from {@link FileChannel}. */ + protected interface OutputStreamOpener { + + /** + * Opens an {@link OutputStream} to write in a {@link FileChannel}. + * + * @param position The initial write position of the {@link OutputStream} view of the {@link + * FileChannel}. + */ + OutputStream open(FileChannel channel, long position) throws IOException; + } + + /** Opens {@link ChannelFastInputStream} from {@link FileChannel}. */ + protected interface ChannelInputStreamOpener { + + /** + * Opens a {@link ChannelFastInputStream} to read a {@link FileChannel}. + * + * @param position The initial read position of the {@link OutputStream} view of the {@link + * FileChannel}. + */ + ChannelFastInputStream open(FileChannel channel, long position) throws IOException; Review Comment: the previous impl (calling `new ChannelFastInputStream`) did not throw IOException. introducing this new signature changes the flow a bit and I was curious if this was necessary. as in, instead of adding `throws ...` just take care of the IOException in the new impl you want to introduce. what I am concerned about is the below change (https://github.com/apache/solr/pull/2012/files#diff-754514ecac361b4d69e8e7c9948f59befe8986afe643562ccb7f192af923f666R1932-R1933) where now you can have an UncheckedIOException bubble up, instead of the previous behavior of simply logging. -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org