-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Starting with Java 19, Lucene has support for using the Java Foreign Memory API. To do enable this, preview features in the JDK must be enabled using --enable-preview. If JDK 19 is used, and preview features are not enabled, a warning message is emitted to stderr. In Elasticsearch, this message is captured and then passed to the main logfile. While the new API may have some benefits in the future, we are not yet ready to recommend enabling preview features. Since the log message from Lucene shows as a warning to users, it is very suggestive that they should enable the feature. In order to avoid that confusion, this commit hides the messages sent by Lucene by filtering those we log from stderr. Note that Lucene emits two messages, and the first contains a timestamp, so the entire message cannot be known ahead of time. The filtering implementation is linear. However, since there are a small number of these, and a similarly small total number of messages that we expect to see from stderr, the performance should not be a concern.
- Loading branch information
Showing
3 changed files
with
43 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters