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

LUCENE-8833: Allow MMapDirectory subclasses to pre-load per IndexInput #697

Closed
wants to merge 1 commit into from

Conversation

s1monw
Copy link
Member

@s1monw s1monw commented Jun 5, 2019

It's useful to select if we preload a mmap on a per index input / file
basis. Subclasses should be able to extend MMapDirectory to make it
configurable.

It's useful to select if we preload a mmap on a per index input / file
basis. Subclasses should be able to extend MMapDirectory to make it
configurable.
@s1monw s1monw requested a review from jpountz July 2, 2019 11:46
c.size(), chunkSizePower, new ByteBufferGuard(resourceDescription, useUnmap ? CLEANER : null));
}
}

/** Maps a file into a set of buffers */
final ByteBuffer[] map(String resourceDescription, FileChannel fc, long offset, long length) throws IOException {
final ByteBuffer[] map(String resourceDescription, FileChannel fc, long offset, long length, boolean preload) throws IOException {
Copy link
Member

Choose a reason for hiding this comment

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

It's somewhat confusing that the preload parameter shadows the instance variable; maybe rename the instance variable to globalPreload or preloadDefault or so to prevent future confusion?

@s1monw
Copy link
Member Author

s1monw commented Jul 2, 2019

superseded by #758

@s1monw s1monw closed this Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants