Add mechanism to react to termination signals (#95850)

This commit adds a mechanism to be exposed internally to allow
plugins/modules to react to termination signals via SPI.

I'm not entirely sure how to test this - normally I'd use an
`ESIntegTestCase` and supply a stubbed version of the plugin but that's
more difficult with SPI.

Supercedes https://github.com/elastic/elasticsearch/pull/95518
This commit is contained in:
Athena Brown 2023-05-17 15:18:37 -06:00 committed by GitHub
parent eb95e1f504
commit d423f40037
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 94 additions and 0 deletions

View file

@ -290,6 +290,7 @@ module org.elasticsearch.server {
exports org.elasticsearch.monitor.os;
exports org.elasticsearch.monitor.process;
exports org.elasticsearch.node;
exports org.elasticsearch.node.internal to org.elasticsearch.internal.sigterm;
exports org.elasticsearch.persistent;
exports org.elasticsearch.persistent.decider;
exports org.elasticsearch.plugins;
@ -379,6 +380,7 @@ module org.elasticsearch.server {
uses org.elasticsearch.reservedstate.ReservedClusterStateHandlerProvider;
uses org.elasticsearch.jdk.ModuleQualifiedExportsService;
uses org.elasticsearch.node.internal.TerminationHandlerProvider;
provides org.apache.lucene.codecs.PostingsFormat
with