Skip to content

[BUG] Creating index-patterns With CCS in Dashboard causes search threadPool to be exhausted in remote clusterΒ #17924

@kkewwei

Description

@kkewwei

Describe the bug

As mentioned in opensearch-project/OpenSearch-Dashboards#8596

When I set the ccs in the cluster settings(the address is pointed to itself to reproduce)

PUT _cluster/settings
{
  "persistent": {
      "cluster": {
         "remote": {
            "ccs1": {
               "mode": "proxy",
               "proxy_address": "127.0.0.1:9300"
            }
         }
      }
  }
}

Creating a new index-patterns in the dashboard, I find that search thread pool is immediately exhausted in the target cluster:

Image

Dashboard will send such request to target cluster, which cause search threadPool to be exhausted in remote cluster.

POST *:*/_search
{
  "size": 0,
  "timeout": "30000ms",
  "query": {
    "match_all": {
      "boost": 1
    }
  },
  "track_total_hits": 2147483647,
  "aggregations": {
    "indices": {
      "terms": {
        "field": "_index",
        "size": 200,
        "min_doc_count": 1,
        "shard_min_doc_count": 0,
        "show_term_doc_count_error": false,
        "order": [
          {
            "_count": "desc"
          },
          {
            "_key": "asc"
          }
        ]
      }
    }
  }
}

Same issue: opensearch-project/index-management-dashboards-plugin#1178

Related component

Search:Remote Search

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

There seems no good way to obtain the index information about the target cluster. As we just want to get the count of indices in the target cluster, if we should add new API in the core code to support?

GET {target_cluster}:*/_stats?metric=docs

Additional Details

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    βœ… Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions