Make current Version pluggable for serverless (#96539)

Version.CURRENT is statically loaded as a constant early during startup.
Yet serverless needs to be able to override the current Version so it
can add additional versions. This commit makes Version.CURRENT pluggable
via SPI. Note that the only way for this to be plugged in is via an
additional jar on the boot layer.
This commit is contained in:
Ryan Ernst 2023-06-06 10:32:01 -05:00 committed by GitHub
parent c076810aa7
commit f086ef1990
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 50 additions and 1 deletions

View file

@ -277,6 +277,7 @@ module org.elasticsearch.server {
exports org.elasticsearch.indices.recovery.plan;
exports org.elasticsearch.indices.store;
exports org.elasticsearch.ingest;
exports org.elasticsearch.internal to org.elasticsearch.serverless.version;
exports org.elasticsearch.lucene.analysis.miscellaneous;
exports org.elasticsearch.lucene.grouping;
exports org.elasticsearch.lucene.queries;
@ -382,6 +383,7 @@ module org.elasticsearch.server {
uses org.elasticsearch.reservedstate.ReservedClusterStateHandlerProvider;
uses org.elasticsearch.jdk.ModuleQualifiedExportsService;
uses org.elasticsearch.node.internal.TerminationHandlerProvider;
uses org.elasticsearch.internal.VersionExtension;
provides org.apache.lucene.codecs.PostingsFormat
with