shatejas commented on issue #13920:
URL: https://github.com/apache/lucene/issues/13920#issuecomment-2421065908

   @uschindler On a high level it makes sense to me. I have a couple of 
questions so that I understand this better
   
   > Add a method to Indexinput to change the IOContext (without cloning it),
   
   I am interested in understanding when its appropriate to clone. Based on the 
[javadoc](https://github.com/apache/lucene/blob/350de210c3674566293681bb58e801629b5ceee7/lucene/core/src/java/org/apache/lucene/store/IndexInput.java#L22-L39)
 for IndexInput, for multithreaded use IndexInput must be cloned. My 
understanding is that merges will have a separate thread.  Since the Readers 
are pooled and the same instance is used - I cloned it when I was trying to 
[benchmark the 
solution](https://github.com/shatejas/lucene/commit/4de387288d70b4d8aede45ef3095ae6c1e189331#diff-e0a29611df21f6d32a461e2d24db1585cdf3a8590f08d93b097f0dd84684ebc8R316).
 Would appreciate if you can give insights on why the indexInput shouldn't be 
cloned in this case.
   
   > "revert to normal use"
   
   In the [benchmarking 
code](https://github.com/shatejas/lucene/commit/4de387288d70b4d8aede45ef3095ae6c1e189331#diff-e0a29611df21f6d32a461e2d24db1585cdf3a8590f08d93b097f0dd84684ebc8R316),
 I did not revert it back thinking the reader will be closed and a new reader 
will be opened with the intended IOContext in this case random. Would you be 
able to share insights on reverting it back considering there will be new 
reader.


-- 
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...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to