-
Notifications
You must be signed in to change notification settings - Fork 7k
[core] Clean up test_raylet_resubscribe_to_worker_death and relevant Raylet logs
#58244
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5225e3f
fix
edoakes ff954fe
fix
edoakes 1b70576
fix
edoakes ab60f5f
fix
edoakes 881977f
fix
edoakes 9b9d772
Fix
edoakes 1700a4c
Fix
edoakes 63b0991
fix
edoakes b71647d
fix
edoakes a24240e
Merge branch 'master' of https://github.com/ray-project/ray into eoak…
edoakes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -545,9 +545,8 @@ void NodeManager::HandleJobFinished(const JobID &job_id, const JobTableData &job | |
| (worker->GetAssignedJobId() == job_id)) { | ||
| // Don't kill worker processes belonging to the detached actor | ||
| // since those are expected to outlive the job. | ||
| RAY_LOG(INFO).WithField(worker->WorkerId()) | ||
| << "The leased worker " | ||
| << " is killed because the job " << job_id << " finished."; | ||
| RAY_LOG(INFO).WithField(worker->WorkerId()).WithField(job_id) | ||
| << "Killing leased worker because its job finished."; | ||
| rpc::ExitRequest request; | ||
| request.set_force_exit(true); | ||
| worker->rpc_client()->Exit( | ||
|
|
@@ -948,7 +947,7 @@ void NodeManager::NodeRemoved(const NodeID &node_id) { | |
| // If the leased worker's owner was on the failed node, then kill the leased | ||
| // worker. | ||
| RAY_LOG(INFO).WithField(worker->WorkerId()).WithField(owner_node_id) | ||
| << "The leased worker is killed because the owner node died."; | ||
| << "Killing leased worker because its owner's node died."; | ||
| worker->KillAsync(io_service_); | ||
| } | ||
|
|
||
|
|
@@ -989,9 +988,10 @@ void NodeManager::HandleUnexpectedWorkerFailure(const WorkerID &worker_id) { | |
| continue; | ||
| } | ||
| // If the failed worker was a leased worker's owner, then kill the leased worker. | ||
| RAY_LOG(INFO) << "The leased worker " << worker->WorkerId() | ||
| << " is killed because the owner process " << owner_worker_id | ||
| << " died."; | ||
| RAY_LOG(INFO) | ||
| .WithField(worker->WorkerId()) | ||
| .WithField("owner_worker_id", owner_worker_id) | ||
| << "Killing leased worker because its owner died."; | ||
| worker->KillAsync(io_service_); | ||
| } | ||
| } | ||
|
|
@@ -1090,10 +1090,9 @@ void NodeManager::HandleClientConnectionError( | |
| error.value(), | ||
| ". ", | ||
| error.message(), | ||
| ". There are some potential root causes. (1) The process is killed by " | ||
| "SIGKILL by OOM killer due to high memory usage. (2) ray stop --force is " | ||
| "called. (3) The worker is crashed unexpectedly due to SIGSEGV or other " | ||
| "unexpected errors."); | ||
| ". Some common causes include: (1) the process was killed by the OOM killer " | ||
| "due to high memory usage, (2) ray stop --force was called, or (3) the worker " | ||
| "crashed unexpectedly due to SIGSEGV or another unexpected error."); | ||
|
|
||
| // Disconnect the client and don't process more messages. | ||
| DisconnectClient( | ||
|
|
@@ -1413,31 +1412,27 @@ void NodeManager::DisconnectClient(const std::shared_ptr<ClientConnection> &clie | |
| rpc::WorkerExitType disconnect_type, | ||
| const std::string &disconnect_detail, | ||
| const rpc::RayException *creation_task_exception) { | ||
| std::shared_ptr<WorkerInterface> worker = worker_pool_.GetRegisteredWorker(client); | ||
| bool is_worker = false, is_driver = false; | ||
| if (worker) { | ||
| // The client is a worker. | ||
| std::shared_ptr<WorkerInterface> worker; | ||
| if ((worker = worker_pool_.GetRegisteredWorker(client))) { | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dayshah is this frowned upon by c++ enjoyers?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, i kinda like the if value syntax, scopes it so it gets destroyed earlier + can't be accessed outside |
||
| is_worker = true; | ||
| RAY_LOG(INFO).WithField(worker->WorkerId()).WithField(worker->GetAssignedJobId()) | ||
| << "Disconnecting worker, graceful=" << std::boolalpha << graceful | ||
| << ", disconnect_type=" << disconnect_type | ||
| << ", has_creation_task_exception=" << std::boolalpha | ||
| << (creation_task_exception != nullptr); | ||
| } else if ((worker = worker_pool_.GetRegisteredDriver(client))) { | ||
| is_driver = true; | ||
| RAY_LOG(INFO).WithField(worker->WorkerId()).WithField(worker->GetAssignedJobId()) | ||
| << "Disconnecting driver, graceful=" << std::boolalpha << graceful | ||
| << ", disconnect_type=" << disconnect_type; | ||
| } else { | ||
| worker = worker_pool_.GetRegisteredDriver(client); | ||
| if (worker) { | ||
| // The client is a driver. | ||
| is_driver = true; | ||
| } else { | ||
| RAY_LOG(INFO) | ||
| << "Not disconnecting client disconnect it has already been disconnected."; | ||
| return; | ||
| } | ||
| RAY_LOG(INFO) << "Got disconnect message from an unregistered client, ignoring."; | ||
| return; | ||
| } | ||
|
|
||
| RAY_LOG(INFO).WithField(worker->WorkerId()) | ||
| << "Disconnecting client, graceful=" << std::boolalpha << graceful | ||
| << ", disconnect_type=" << disconnect_type | ||
| << ", has_creation_task_exception=" << std::boolalpha | ||
| << (creation_task_exception != nullptr); | ||
| RAY_CHECK(is_worker != is_driver) << "Client must be a registered worker or driver."; | ||
|
|
||
| RAY_CHECK(worker != nullptr); | ||
| RAY_CHECK(!(is_worker && is_driver)); | ||
| // Clean up any open ray.get or ray.wait calls that the worker made. | ||
| lease_dependency_manager_.CancelGetRequest(worker->WorkerId()); | ||
| lease_dependency_manager_.CancelWaitRequest(worker->WorkerId()); | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessarily noisy when debug logs were on