jimczi opened a new pull request, #16682: URL: https://github.com/apache/lucene/pull/16682
# Carry file open hints on merge and flush contexts `IOContext.merge(...).withHints(...)` returns the same context and drops the hints, and so does `flush(...)`. Anything opened during a merge reaches the directory with no hints at all. Vectors hit this twice. The graph build reopens the vectors of the segment it just wrote and scores against them in graph order, and a quantized format scores against a temporary file of query vectors. Both are random access. The first arrives with its hints stripped, the second says nothing at all. So merge and flush contexts now carry hints like any other context, and that temporary file states its access pattern like every other vectors file: `FileTypeHint.DATA`, `FileDataHint.KNN_VECTORS`, `DataAccessHint.RANDOM`. Nothing behaves differently. A hint says how a file is read; what to do with it belongs to whoever maps it, and `MMapDirectory.ADVISE_BY_CONTEXT` is unchanged here. The point is that a directory can now tell what these files are instead of guessing from names. `TestVectorHintsDuringMerge` covers both files. `TestIOContext` changes because merge and flush contexts used to ignore hints. -- 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]
