jpountz commented on PR #13196: URL: https://github.com/apache/lucene/pull/13196#issuecomment-2015086424
I'm curious if you've already thought of how we could update the `IOContext` on our merge instances. If I'm not mistaken, given how reader pooling works in `IndexWriter`, if you use a `SegmentReader` for search and then the same segment is included in a merge, then this `SegmentReader` will not use an `IOContext.Context.MERGE` context but a `IOContext.Context.READ` context (because it's reusing the first reader that was created). It would be nice if our file format merge instances (e.g. `StoredFieldsReader#getMergeInstance`) could somehow use a `IOContext.Context.MERGE` even though they might be cloned from a reader that was created with a `IOContext.Context.READ` context. I don't think it should block this change, it's a good step in the right direction, this other problem is quite orthogonal. -- 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