uschindler commented on a change in pull request #572:
URL: https://github.com/apache/lucene/pull/572#discussion_r775823230
##########
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 was tinking about this, too last night.
I'd just remove the message prefix and just print
`UNMAP_NOT_SUPPORTED_REASON`. If this is caused by one calling
`FSDirectory.open()` the person known that you may need to tune the unmapping
(the reason and error messages are given). The log statement will also print
class name, so all is fine.
Adding it as clinit toFSDirectory is bad, if somebody uses another subclass.
The message could also move to `FSDirectory.open()`, but then it should be
one-time only, so it needs an `AtomicBoolean` or similar :-)
So let's just remove the prefix on the message! OK?
--
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]