Skip to content

ThreadPool signature breaks Logstash elastic_integration plugin build with 8.12.x version(s). #104959

@mashhurs

Description

@mashhurs

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

  1. [EDITED] Keep OLD constructor set it deprecated and 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
    });
}
  1. 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);
}
  1. TODO: We have a bridge between plugin and ES, checking possibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions