psalagnac commented on code in PR #5410:
URL: https://github.com/apache/solr/pull/5410#discussion_r4753590119
##########
solr/core/src/java/org/apache/solr/core/MMapDirectoryFactory.java:
##########
@@ -64,6 +66,6 @@ public void init(NamedList<?> args) {
protected Directory create(String path, LockFactory lockFactory) throws
IOException {
MMapDirectory mapDirectory = new MMapDirectory(Path.of(path), lockFactory,
maxChunk);
mapDirectory.setPreload((s, ioContext) -> preload);
- return mapDirectory;
+ return configureMMapReadAdvice(mapDirectory);
Review Comment:
`preload` also applies to all mmap directories. Ideally, applying the two
configuration flags should be aligned.
##########
solr/core/src/java/org/apache/solr/core/NIOFSDirectoryFactory.java:
##########
@@ -27,6 +27,6 @@ public class NIOFSDirectoryFactory extends
StandardDirectoryFactory {
@Override
protected Directory create(String path, LockFactory lockFactory) throws
IOException {
- return new NIOFSDirectory(Path.of(path), lockFactory);
+ return configureMMapReadAdvice(new NIOFSDirectory(Path.of(path),
lockFactory));
Review Comment:
The directory created here is not a mmap directory. There is no reason to
apply mmap parameters.
--
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]