rmuir commented on a change in pull request #572:
URL: https://github.com/apache/lucene/pull/572#discussion_r775699604
##########
File path: lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java
##########
@@ -343,6 +344,9 @@ private IOException convertMapFailedIOException(
CLEANER = null;
UNMAP_SUPPORTED = false;
UNMAP_NOT_SUPPORTED_REASON = hack.toString();
+ Logger.getLogger(MMapDirectory.class.getName())
+ .warning(
+ "Use of MMapDirectory was disabled by default:
".concat(UNMAP_NOT_SUPPORTED_REASON));
Review comment:
I think this is confusing to say 'MMAPDirectory was disabled' from
`MMapDirectory` class? This class still functions correctly, it just won't
forcibly unmap(), kernel resources may be wasted because GC has not decided
they were important, etc. Still probably just fine for a static index.
It is `FSDirectory` class that instead chooses a different default for
`FSDirectory.open` based on whether unmap() is
supported and the platform is 64-bits. So I would prefer to log
"enabled/disabled" from that class?
--
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]