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 completion count in SearchBackpressure nodeStats API #8701

Closed
wants to merge 331 commits into from

Conversation

kaushalmahi12
Copy link
Contributor

@kaushalmahi12 kaushalmahi12 commented Jul 14, 2023

Description

With this change the nodeStats API will also return the completionCount of search tasks at shard and coordinator level.

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

Gradle Check (Jenkins) Run Completed with:

Copy link
Contributor

@PritLadani PritLadani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we also include a metric suggesting whether the node is under duress or not? It will be useful for investigation.
IsNodeUnderDuress can be added in the SearchBackpressureStats pojo.

@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:

linuxpi and others added 20 commits September 12, 2023 10:56
…project#9719)

---------

Signed-off-by: bansvaru <bansvaru@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
* Fix default tracer falky test

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Empty-Commit

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Empty-Commit

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

---------

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>
Co-authored-by: Gagan Juneja <gjjuneja@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
…ct#9840)

Signed-off-by: Ticheng Lin <ticheng@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
…oreFormat (opensearch-project#9908)

Signed-off-by: bansvaru <bansvaru@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
…pensearch-project#9727)

* Improve performance of rounding dates in date_histogram aggregation

Signed-off-by: Ketan Verma <ketan9495@gmail.com>

* Minor refactoring changes

Signed-off-by: Ketan Verma <ketan9495@gmail.com>

---------

Signed-off-by: Ketan Verma <ketan9495@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
…peTestCase annotation (opensearch-project#9916)

Signed-off-by: Neetika Singhal <neetiks@amazon.com>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Co-authored-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
…nt Replication (opensearch-project#9585)

* support realtime TermVector and MultiTermVector requests with segment replication.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Fix TermVector requests with segrep.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Refacotring.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Address comments on PR.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

---------

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
Signed-off-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
…ject#9415)

* Add Instrumentation

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* update changelog

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* clear the context

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Add Instrumentation

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Fix test cases

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Empty-Commit

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Add Instrumentation

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Add Instrumentation

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Remove internal transport action check

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Changes

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Refactor code

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Fix failing test cases

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Fix failing test cases

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Fix failing test cases

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Fix failing test cases

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Fix failing test cases

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Empty-Commit

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Fix failing test cases

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Fix java doc

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Empty-Commit

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address merge conflicts

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address merge conflicts

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Empty-Commit

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Empty-Commit

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Enable NumberOfTraceIDsEqualToRequests test

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Fix java doc

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Fix java doc

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Empty-Commit

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Fix test case

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Remove instrumentation from TransportService

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

---------

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>
Signed-off-by: Gagan Juneja <gagandeepjuneja@gmail.com>
Co-authored-by: Gagan Juneja <gjjuneja@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
This plugin has been moved to its own [repository][1].

[1]: https://github.com/opensearch-project/custom-codecs

Signed-off-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
…dle simulation (opensearch-project#9915)

Signed-off-by: Kunal Kotwani <kkotwani@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
* Clear CHANGELOG for released 2.x changes

Signed-off-by: Kunal Kotwani <kkotwani@amazon.com>

* Add release notes for 2.10

Signed-off-by: Kunal Kotwani <kkotwani@amazon.com>

---------

Signed-off-by: Kunal Kotwani <kkotwani@amazon.com>
…ject#9956)

Fix is pending in opensearch-project#7771, but that PR may take some time to land in main
so muting for the time being.

Signed-off-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Instead of appending a new comment every time check compatibility runs,
this will instead update a single comment with the latest results. The
history of previous runs is retained in the comment as GitHub allows you
to view the edited revisions of any comment. This matches the behavior
of the codecov workflow and should substantially reduce noise in PRs.

Relates opensearch-project#9699

Signed-off-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
* fixing javadoc of org.opensearch.cli.Terminal

Signed-off-by: Laurent Laborde <kerdezixe@gmail.com>

* fixing javadoc of org.opensearch.cli.ExitCodes

Signed-off-by: Laurent Laborde <kerdezixe@gmail.com>

* fixing javadoc

Signed-off-by: Laurent Laborde <kerdezixe@gmail.com>

* fixing a mishap in formatting rule

Signed-off-by: Laurent Laborde <kerdezixe@gmail.com>

---------

Signed-off-by: Laurent Laborde <kerdezixe@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
…ject#9575)

* Bump peter-evans/create-or-update-comment from 2 to 3

Bumps [peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment) from 2 to 3.
- [Release notes](https://github.com/peter-evans/create-or-update-comment/releases)
- [Commits](peter-evans/create-or-update-comment@v2...v3)

---
updated-dependencies:
- dependency-name: peter-evans/create-or-update-comment
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
* Bump actions/checkout from 2 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
…earch-project#9973)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Update changelog.

Signed-off-by: Austin Lee <austin@aryn.ai>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
…ct#9965)

Signed-off-by: Sooraj Sinha <soosinha@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
@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:

@stephen-crawford
Copy link
Contributor

Please rebase--this says 331 commits are involved with this change. Thank you

@kaushalmahi12
Copy link
Contributor Author

Closing this PR in favor of #10028 due to DCO validation failure in a past commit.

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.