opensearch-sdk-java icon indicating copy to clipboard operation
opensearch-sdk-java copied to clipboard

Anomaly Detection Create components integration with HashRing

Open joshpalis opened this issue 3 years ago • 1 comments

Is your feature request related to a problem?

Create components integration for Anomaly Detection requires the removal of ClusterService from component constructors and to replace them with transport API requests to OpenSearch to add setting update consumers to OpenSearch's ClusterService. However, the ADTaskManager component requires this HashRing object.

Internally, this HashRing utilizes the cluster service to determine the AD version of the local node and either build or retrieve nodes with the same version.

This is used by the ADTaskManager to identify and send requests to the coordinating Anomaly Detector node, which in turn delegates AD tasks to worker nodes to execute.

Open to suggestions on how to move forward. CC: @saratvemulapalli @owaiskazi19 @dbwiddis

joshpalis avatar Oct 19 '22 19:10 joshpalis

The underlying issue is that in the plugin model, a copy of the plugin is running on every node in the OpenSearch cluster, so the cluster state is relevant for finding those other same-version plugin copies.

In the extensions model, we are executing AD tasks locally on the extension and without a corresponding "plugin" running on other nodes, there's no reason to send anything to the ExtensionsOrchestrator.

The ideal long term solution is to have a standard "execute this task on the OpenSearch cluster" with the ability to control which nodes in the cluster execute it based on some filter. In the near term, I think we need to ignore this "check AD version" bit and just send everything to the whole cluster.

dbwiddis avatar Oct 22 '22 19:10 dbwiddis