mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
Add native access library (#105100)
Elasticsearch requires access to some native functions. Historically this has been achieved with the JNA library. However, JNA is a complicated, magical library, and has caused various problems booting Elasticsearch over the years. The new Java Foreign Function and Memory API allows access to call native functions directly from Java. It also has the advantage of tight integration with hotspot which can improve performance of these functions (though performance of Elasticsearch's native calls has never been much of an issue since they are mostly at boot time). This commit adds a new native lib that is internal to Elasticsearch. It is built to use the foreign function api starting with Java 21, and continue using JNA with Java versions below that. Only one function, checking whether Elasticsearch is running as root, is migrated. Future changes will migrate other native functions.
This commit is contained in:
parent
0022005e17
commit
6375e9f443
33 changed files with 844 additions and 25 deletions
|
@ -14,7 +14,7 @@ module org.elasticsearch.base {
|
|||
|
||||
exports org.elasticsearch.core;
|
||||
exports org.elasticsearch.jdk;
|
||||
exports org.elasticsearch.core.internal.provider to org.elasticsearch.xcontent;
|
||||
exports org.elasticsearch.core.internal.provider to org.elasticsearch.xcontent, org.elasticsearch.nativeaccess;
|
||||
|
||||
uses ModuleQualifiedExportsService;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue