jimczi opened a new pull request, #16684:
URL: https://github.com/apache/lucene/pull/16684

   A merge reads stored fields front to back, while searches read the same file 
at random.
   `getMergeInstance()` clones the mapping the reader already holds, so whether 
a merge gets sequential
   reads comes down to who opened the segment first. Asking for them in place 
is not an option, since
   read advice applies to a whole mapping and searches are on it.
   
   So a merge opens the data file for itself with `DataAccessHint.SEQUENTIAL`, 
and searches keep the
   mapping they have. The original reader owns that second mapping and closes 
it, since merge instances
   are never closed.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to