Skip to content

[BUG] Discrepancy between Profile API and realtime tasks API #502

@amitgalitz

Description

@amitgalitz

What is the bug?
There is discrepancy between the results returned from the profile API and search tasks API. This occurs when restarting an Opensearch cluster that already has a HCAD running.
How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Start Opensearch cluster and dashboards with AD plugin
  2. create and wait for HCAD to be running and returning anomaly results
  3. stop and start OpenSearch cluster
  4. HCAD will go back to showing as initializing again on frontend
  5. Profile API for detector will return response of running
  6. Search request to ..._plugins/_anomaly_detection/detectors/tasks/_search with body of:
{
  "query": {
    "bool": {
      "filter": [
        {
          "term": {
            "detector_id": "N64oKYABE8ZUzJlQp33e"
          }
        },
        {
          "term": {
            "task_type": "REALTIME_HC_DETECTOR"
          }
        },
        {
          "term": {
            "is_latest": "true"
          }
        }
      ]
    }
  }
}

returns response with initializing

What is the expected behavior?
HCAD to show as running on frontend and all relevant API responses

What is your host/environment?

  • Opensearch 2.0.0-alpha1-snapshot (4/14/22)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv2.5.0'Issues and PRs related to version v2.5.0'

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions