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

[BUG] Get tasks action does not refresh resource stats #8655

Closed
jed326 opened this issue Jul 12, 2023 · 1 comment
Closed

[BUG] Get tasks action does not refresh resource stats #8655

jed326 opened this issue Jul 12, 2023 · 1 comment
Labels
bug Something isn't working distributed framework Search Search query, autocomplete ...etc v2.13.0 Issues and PRs related to version 2.13.0 v3.0.0 Issues and PRs related to version 3.0.0

Comments

@jed326
Copy link
Collaborator

jed326 commented Jul 12, 2023

Describe the bug
Task resource usage stats are currently refreshed in 2 places:

  1. In the List Tasks action
    operation = operation.andThen(taskResourceTrackingService::refreshResourceStats);
  2. By the SearchBackpressureService
    taskResourceTrackingService.refreshResourceStats(searchTasks.toArray(new Task[0]));
    taskResourceTrackingService.refreshResourceStats(searchShardTasks.toArray(new Task[0]));

However, this is not done in the get tasks action: https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/get/TransportGetTaskAction.java

This means that if search backpressure is disabled, a user will not see any updates to the resource stats when only calling the get tasks API.

Expected behavior
Get tasks API should also update task resource usage stats.

@jed326 jed326 added bug Something isn't working untriaged distributed framework Search Search query, autocomplete ...etc and removed untriaged labels Jul 12, 2023
@jed326 jed326 changed the title [BUG] Get Tasks should refresh resource stats [BUG] Get tasks action does not refresh resource stats Jul 12, 2023
@gaobinlong
Copy link
Collaborator

I've opened a PR for this bug, could anyone help to review?

@reta reta added v3.0.0 Issues and PRs related to version 3.0.0 v2.13.0 Issues and PRs related to version 2.13.0 labels Feb 26, 2024
@reta reta closed this as completed Feb 26, 2024
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Search Project Board Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working distributed framework Search Search query, autocomplete ...etc v2.13.0 Issues and PRs related to version 2.13.0 v3.0.0 Issues and PRs related to version 3.0.0
Projects
Archived in project
Development

No branches or pull requests

3 participants