Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use READONCE io context for nrt, add MMap grouping options #774

Merged

Conversation

aprudhomme
Copy link
Contributor

The MMapDirectory in the newer lucene versions use the new java native memory api, if available. By default, mapping files from the same segment use a ref counted memory Arena. When we open files for nrt operations, the mappings will persist until the segment is closed. This can lead to an accumulation of mappings of the same files.

Opening files for nrt operations have been changed to use the READONCE io context. This avoids use of mmap file groupings. This could not be used for RecvRawFileV2Handler, since this type of mapping can only be used by the opening thread. We will need to handle this another way in the future for acked copy.

The config now exposes mmapGrouping to set the grouping function:

  • SEGMENT (default) - All files from the same segment are grouped
  • SEGMENT_EXCEPT_SI - All files from the same segment are grouped, except .si files. The segment info file for all index segments are read on completion of an nrt point. This option may be useful to stop accumulation of these mappings on replicas.
  • NONE - No file grouping

@aprudhomme aprudhomme requested a review from sarthakn7 October 28, 2024 17:39
@aprudhomme aprudhomme merged commit 47f4f9b into Yelp:main Oct 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants