Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add taskCompletionCount in search_backpressure stats #10028

Merged
merged 12 commits into from
Oct 10, 2023

Conversation

kaushalmahi12
Copy link
Contributor

@kaushalmahi12 kaushalmahi12 commented Sep 13, 2023

Description

With this change the nodeStats API will also return the completionCount of search tasks at shard and coordinator level. Opening this separate PR due to DCO issue in a past commit.
Closed PR : #8701.

new sample response for an API call like curl "localhost:9200/_nodes/stats/search_backpressure?pretty" will look like the following

{
  "_nodes" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "cluster_name" : "runTask",
  "nodes" : {
    "dPpgbce2STSxlvH7LDaGiA" : {
      "timestamp" : 1693433903192,
      "name" : "runTask-0",
      "transport_address" : "127.0.0.1:9300",
      "host" : "127.0.0.1",
      "ip" : "127.0.0.1:9300",
      "roles" : [
        "cluster_manager",
        "data",
        "ingest",
        "remote_cluster_client"
      ],
      "attributes" : {
        "testattr" : "test",
        "shard_indexing_pressure_enabled" : "true"
      },
      "search_backpressure" : {
        "search_task" : {
          "resource_tracker_stats" : {
            "cpu_usage_tracker" : {
              "cancellation_count" : 0,
              "current_max_millis" : 0,
              "current_avg_millis" : 0
            },
            "elapsed_time_tracker" : {
              "cancellation_count" : 0,
              "current_max_millis" : 0,
              "current_avg_millis" : 0
            },
            "heap_usage_tracker" : {
              "cancellation_count" : 0,
              "current_max_bytes" : 0,
              "current_avg_bytes" : 0,
              "rolling_avg_bytes" : 0
            }
          },
          "completion_count" : 0,
          "cancellation_stats" : {
            "cancellation_count" : 0,
            "cancellation_limit_reached_count" : 0
          }
        },
        "search_shard_task" : {
          "resource_tracker_stats" : {
            "cpu_usage_tracker" : {
              "cancellation_count" : 0,
              "current_max_millis" : 0,
              "current_avg_millis" : 0
            },
            "elapsed_time_tracker" : {
              "cancellation_count" : 0,
              "current_max_millis" : 0,
              "current_avg_millis" : 0
            },
            "heap_usage_tracker" : {
              "cancellation_count" : 0,
              "current_max_bytes" : 0,
              "current_avg_bytes" : 0,
              "rolling_avg_bytes" : 0
            }
          },
          "completion_count" : 0,
          "cancellation_stats" : {
            "cancellation_count" : 0,
            "cancellation_limit_reached_count" : 0
          }
        },
        "mode" : "monitor_only"
      },
      "is_node_under_duress" : false
    }
  }
}

Related Issues

Resolves #8698

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 13, 2023

Compatibility status:

Checks if related components are compatible with change 9f2565a

Incompatible components

Incompatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/ml-commons.git]

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git]

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT.test {yaml=pit/10_basic/Delete all}
      1 org.opensearch.index.shard.RemoteStoreRefreshListenerTests.testRefreshSuccessOnSecondAttempt

@msfroh msfroh merged commit ef6dafe into opensearch-project:main Oct 10, 2023
15 of 16 checks passed
deshsidd pushed a commit to deshsidd/OpenSearch that referenced this pull request Oct 19, 2023
…ect#10028)

* add taskCompletionCount in search_backpressure

Signed-off-by: Kaushal Kumar <[email protected]>

* address comments to use final objects

Signed-off-by: Kaushal Kumar <[email protected]>

* do spotless check run

Signed-off-by: Kaushal Kumar <[email protected]>

* use primitive long to store completionCount

Signed-off-by: Kaushal Kumar <[email protected]>

* use primitive long to store completionCount in searchTaskStats

Signed-off-by: Kaushal Kumar <[email protected]>

* add pr link against the change

Signed-off-by: Kaushal Kumar <[email protected]>

* add taskCompletionCount in search_backpressure

Signed-off-by: Kaushal Kumar <[email protected]>

* address comments to use final objects

Signed-off-by: Kaushal Kumar <[email protected]>

* do spotless check run

Signed-off-by: Kaushal Kumar <[email protected]>

* use primitive long to store completionCount

Signed-off-by: Kaushal Kumar <[email protected]>

* rebase with upstream main

Signed-off-by: Kaushal Kumar <[email protected]>

* rebase with upstream main

Signed-off-by: Kaushal Kumar <[email protected]>

---------

Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
austintlee pushed a commit to austintlee/OpenSearch that referenced this pull request Oct 23, 2023
…ect#10028)

* add taskCompletionCount in search_backpressure

Signed-off-by: Kaushal Kumar <[email protected]>

* address comments to use final objects

Signed-off-by: Kaushal Kumar <[email protected]>

* do spotless check run

Signed-off-by: Kaushal Kumar <[email protected]>

* use primitive long to store completionCount

Signed-off-by: Kaushal Kumar <[email protected]>

* use primitive long to store completionCount in searchTaskStats

Signed-off-by: Kaushal Kumar <[email protected]>

* add pr link against the change

Signed-off-by: Kaushal Kumar <[email protected]>

* add taskCompletionCount in search_backpressure

Signed-off-by: Kaushal Kumar <[email protected]>

* address comments to use final objects

Signed-off-by: Kaushal Kumar <[email protected]>

* do spotless check run

Signed-off-by: Kaushal Kumar <[email protected]>

* use primitive long to store completionCount

Signed-off-by: Kaushal Kumar <[email protected]>

* rebase with upstream main

Signed-off-by: Kaushal Kumar <[email protected]>

* rebase with upstream main

Signed-off-by: Kaushal Kumar <[email protected]>

---------

Signed-off-by: Kaushal Kumar <[email protected]>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…ect#10028)

* add taskCompletionCount in search_backpressure

Signed-off-by: Kaushal Kumar <[email protected]>

* address comments to use final objects

Signed-off-by: Kaushal Kumar <[email protected]>

* do spotless check run

Signed-off-by: Kaushal Kumar <[email protected]>

* use primitive long to store completionCount

Signed-off-by: Kaushal Kumar <[email protected]>

* use primitive long to store completionCount in searchTaskStats

Signed-off-by: Kaushal Kumar <[email protected]>

* add pr link against the change

Signed-off-by: Kaushal Kumar <[email protected]>

* add taskCompletionCount in search_backpressure

Signed-off-by: Kaushal Kumar <[email protected]>

* address comments to use final objects

Signed-off-by: Kaushal Kumar <[email protected]>

* do spotless check run

Signed-off-by: Kaushal Kumar <[email protected]>

* use primitive long to store completionCount

Signed-off-by: Kaushal Kumar <[email protected]>

* rebase with upstream main

Signed-off-by: Kaushal Kumar <[email protected]>

* rebase with upstream main

Signed-off-by: Kaushal Kumar <[email protected]>

---------

Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
@dblock
Copy link
Member

dblock commented Aug 1, 2024

I am seeing this value in a 3.0 build, but not in a 2.x, was this not intended to be backported to 2.x?

opensearch-project/opensearch-api-specification#459

@kaushalmahi12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants