Skip to content

Conversation

iverase
Copy link
Contributor

@iverase iverase commented Aug 27, 2025

IOContext.DEFAULT.withReadAdvice(ReadAdvice.SEQUENTIAL) has currently a very specific meaning in the hybrid directory and it prevents files to be mmapped. Thid behavior is not desrired so lets change it with IOContext.READONCE. Note that this will change in the next release of lucene and we will have the right API to define it.

@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Aug 27, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

Comment on lines +302 to +303
IndexInput vectors = mergeState.segmentInfo.dir.openInput(tempRawVectorsFileName, IOContext.READONCE);
IndexInput docs = docsFileName == null ? null : mergeState.segmentInfo.dir.openInput(docsFileName, IOContext.READONCE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is OK. None of the inputs are accessed from a different thread other than this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, and this is changing very soon with the new API.

@iverase iverase merged commit 0814e2f into elastic:main Aug 27, 2025
33 checks passed
@iverase iverase deleted the ReadAdvice branch August 27, 2025 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants