Skip to content

Conversation

jjyao
Copy link
Collaborator

@jjyao jjyao commented Feb 6, 2025

Why are these changes needed?

For ReportWorkerBacklogRequest that's received after the core worker is marked as dead, we should ignore. Otherwise, we will have permanently leaked backlogs.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
@jjyao jjyao added the go add ONLY when ready to merge, run all tests label Feb 6, 2025
send_reply_callback(Status::OK(), nullptr, nullptr);
return;
}

local_task_manager_->ClearWorkerBacklog(worker_id);
Copy link

Choose a reason for hiding this comment

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

if worker_id is not in the worker_pool, should one ClearWorkerBacklog(worker_id) anyway to set backlog to empty?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That has already been called when the worker is marked dead.

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Comment on lines +1863 to +1868
if (worker_pool.GetRegisteredWorker(worker_id) == nullptr &&
worker_pool.GetRegisteredDriver(worker_id) == nullptr) {
// The worker is already disconnected.
send_reply_callback(Status::OK(), nullptr, nullptr);
return;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the actual fix. The remaining of this PR is to make it unit testable.

@jjyao jjyao marked this pull request as ready for review February 10, 2025 22:45
Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
@jjyao jjyao merged commit 2d5a99e into ray-project:master Feb 11, 2025
5 checks passed
@jjyao jjyao deleted the jjyao/backlog branch February 11, 2025 22:46
xsuler pushed a commit to antgroup/ant-ray that referenced this pull request Mar 4, 2025
Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
xsuler pushed a commit to antgroup/ant-ray that referenced this pull request Mar 4, 2025
Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
park12sj pushed a commit to park12sj/ray that referenced this pull request Mar 18, 2025
Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-backlog go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants