You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/12/28 02:32:29 UTC
[GitHub] [lucene] rmuir commented on a change in pull request #572: LUCENE-10342: Add some logging to static initializers to warn users if unmapping or object size calculation does not work
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: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org