stillalex commented on code in PR #2012: URL: https://github.com/apache/solr/pull/2012#discussion_r1364021375
########## 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: ok I see what you are saying. it's all handled in `#run` method (this code is very confusing to read, some exceptions are handled locally some bubble up). I am ok with your changes, as you point out the exception is handled one level up so nothing changes in the flow. -- 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