-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Description
Description
Logstash recently developed elastic_integration
plugin. When building the plugin, we internally use Elasticsearch sources. Source changes in Elasticsearch may affect the plugin if the plugin is using changed APIs/classes.
Recently, ES changed its ThreadPool
constructor signature and ThreadPool
was referenced by the elastic_integration
plugin source. If we apply constructor changes, we no longer can build plugin against current stack release 8.12.x versions and validate its working state.
We can still build plugin against ES main branch and use with 8.12.x versions. However, since the plugin is not a default plugin yet, manual installation always fetch the latest version, may introduce abnormal states.
Acceptance Criteria
We understand that it is not ES breaking change boundary and ES team may encourage to always sync with latest source. However, as much as possible, we would like to mitigate risks with the plugin and keep 🟢 building against ES current release, snapshot and main branches. So, we ask a collaboration!
Possible approaches
- [EDITED] Keep OLD constructor
set it deprecatedand separate recent interface
public ThreadPool(Settings settings, MeterRegistry meterRegistry, ExecutorBuilder<?>... customBuilders) {
this(settings, customBuilders);
this.executors.forEach((k, v) -> {
this.instruments.put(k, setupMetrics(meterRegistry, k, v)); // instruments is not final
});
}
- OR another approach would be OLD constructor uses no-op metric by default (need to confirm with ES team if default is a desired behavior) on top of current ES change:
public ThreadPool(Settings settings, ExecutorBuilder<?>... customBuilders) {
this(settings, MeterRegistry.NOOP, customBuilders);
}
- TODO: We have a bridge between plugin and ES, checking possibility.