Skip to content

Conversation

@gargmanik13
Copy link
Contributor

Description

Added time_in_execution attribute to /_cluster/pending_tasks response

  • For task under execution we will get execution time in response
  • For all other tasks, this will be zero
 OpenSearch git:(time_execution_metrics) ✗ curl -X GET "localhost:9200/_cluster/pending_tasks?pretty" \
     -H 'Content-Type: application/json'
{
  "tasks" : [
    {
      "insert_order" : 5,
      "priority" : "URGENT",
      "source" : "create-index [my_new_index], cause [api]",
      "executing" : true,
      "time_in_queue_millis" : 19703,
      "time_in_queue" : "19.7s",
      "time_in_execution_millis" : 19701,
      "time_in_execution" : "19.7s"
    },
    {
      "insert_order" : 6,
      "priority" : "URGENT",
      "source" : "create-index [my_new_index_2], cause [api]",
      "executing" : false,
      "time_in_queue_millis" : 8999,
      "time_in_queue" : "8.9s",
      "time_in_execution_millis" : 0,
      "time_in_execution" : "0s"
    },
    {
      "insert_order" : 7,
      "priority" : "URGENT",
      "source" : "create-index [my_new_index_3], cause [api]",
      "executing" : false,
      "time_in_queue_millis" : 3123,
      "time_in_queue" : "3.1s",
      "time_in_execution_millis" : 0,
      "time_in_execution" : "0s"
    }
  ]
}

Related Issues

Resolves #11818

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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 github-actions bot added Cluster Manager enhancement Enhancement or improvement to existing feature or request labels Apr 3, 2025
@gargmanik13 gargmanik13 force-pushed the time_execution_metrics branch from e9a5f84 to 8294f2e Compare April 3, 2025 11:35
@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2025

❌ Gradle check result for 8294f2e: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@gargmanik13 gargmanik13 force-pushed the time_execution_metrics branch from 8294f2e to 679819b Compare April 3, 2025 14:54
@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2025

❌ Gradle check result for 679819b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@gargmanik13 gargmanik13 force-pushed the time_execution_metrics branch from 679819b to 70f29b9 Compare April 3, 2025 17:51
@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2025

❕ Gradle check result for 70f29b9: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@codecov
Copy link

codecov bot commented Apr 3, 2025

Codecov Report

Attention: Patch coverage is 48.27586% with 15 lines in your changes missing coverage. Please review.

Project coverage is 72.66%. Comparing base (d52cefa) to head (b655665).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...opensearch/cluster/service/PendingClusterTask.java 0.00% 9 Missing ⚠️
...min/cluster/tasks/PendingClusterTasksResponse.java 0.00% 4 Missing ⚠️
...rrent/PrioritizedOpenSearchThreadPoolExecutor.java 87.50% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17780      +/-   ##
============================================
- Coverage     72.74%   72.66%   -0.09%     
+ Complexity    67767    67752      -15     
============================================
  Files          5497     5497              
  Lines        311815   311840      +25     
  Branches      45261    45266       +5     
============================================
- Hits         226822   226589     -233     
- Misses        66504    66815     +311     
+ Partials      18489    18436      -53     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gargmanik13
Copy link
Contributor Author

❕ Gradle check result for 70f29b9: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Test Result (1 failure / -2)
org.opensearch.snapshots.DedicatedClusterSnapshotRestoreIT.testSnapshotWithStuckNode

Flaky test - #15806

@gargmanik13 gargmanik13 force-pushed the time_execution_metrics branch from 21186bc to dd64d73 Compare May 13, 2025 09:55
@github-actions
Copy link
Contributor

✅ Gradle check result for dd64d73: SUCCESS

Copy link
Contributor

@rajiv-kv rajiv-kv left a comment

Choose a reason for hiding this comment

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

LGTM!

@github-actions
Copy link
Contributor

❌ Gradle check result for 8f732f2: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Manik Garg <gargmanik1317@gmail.com>
@gargmanik13 gargmanik13 force-pushed the time_execution_metrics branch from 36f13a8 to 3f8fb8f Compare May 23, 2025 09:51
@github-actions
Copy link
Contributor

❕ Gradle check result for 3f8fb8f: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@github-project-automation github-project-automation bot moved this from 🏗 In progress to 👀 In review in Cluster Manager Project Board Jun 2, 2025
Signed-off-by: shwetathareja <shwetathareja@live.com>
@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2025

✅ Gradle check result for b655665: SUCCESS

@shwetathareja shwetathareja merged commit e1826c2 into opensearch-project:main Jun 4, 2025
29 of 30 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Cluster Manager Project Board Jun 4, 2025
Gagan6164 pushed a commit to Gagan6164/OpenSearch that referenced this pull request Jun 8, 2025
Gagan6164 pushed a commit to Gagan6164/OpenSearch that referenced this pull request Jun 8, 2025
rgsriram pushed a commit to rgsriram/OpenSearch that referenced this pull request Jun 9, 2025
abhita pushed a commit to abhita/OpenSearch that referenced this pull request Jun 9, 2025
@gargmanik13 gargmanik13 deleted the time_execution_metrics branch June 21, 2025 13:16
neuenfeldttj pushed a commit to neuenfeldttj/OpenSearch that referenced this pull request Jun 26, 2025
…opensearch-project#17780)

Signed-off-by: Manik Garg <gargmanik1317@gmail.com>Signed-off-by: TJ Neuenfeldt <tjneu@amazon.com>
neuenfeldttj pushed a commit to neuenfeldttj/OpenSearch that referenced this pull request Jun 26, 2025
tandonks pushed a commit to tandonks/OpenSearch that referenced this pull request Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Cluster Manager enhancement Enhancement or improvement to existing feature or request

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

[Feature Request] Latency metrics of task execution in cluster manager

4 participants