-
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
Changes from all commits
5225e3f
ff954fe
1b70576
ab60f5f
881977f
9b9d772
1700a4c
63b0991
b71647d
a24240e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,6 @@ PeriodicalRunner::PeriodicalRunner(instrumented_io_context &io_service) | |
| : io_service_(io_service) {} | ||
|
|
||
| PeriodicalRunner::~PeriodicalRunner() { | ||
| RAY_LOG(DEBUG) << "PeriodicalRunner is destructed"; | ||
|
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. unnecessarily noisy when debug logs were on |
||
| absl::MutexLock lock(&mutex_); | ||
| for (const auto &timer : timers_) { | ||
| timer->cancel(); | ||
|
|
||
| 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_); | ||
| } | ||
| } | ||
|
|
@@ -1053,6 +1053,8 @@ bool NodeManager::ResourceDeleted(const NodeID &node_id, | |
| void NodeManager::HandleNotifyGCSRestart(rpc::NotifyGCSRestartRequest request, | ||
| rpc::NotifyGCSRestartReply *reply, | ||
| rpc::SendReplyCallback send_reply_callback) { | ||
| RAY_LOG(INFO) | ||
| << "The GCS has restarted. Resubscribing to pubsub and notifying local workers."; | ||
| // When GCS restarts, it'll notify raylet to do some initialization work | ||
| // (resubscribing). Raylet will also notify all workers to do this job. Workers are | ||
| // registered to raylet first (blocking call) and then connect to GCS, so there is no | ||
|
|
@@ -1090,10 +1092,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 +1414,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()); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.