mirror of
https://github.com/vale981/ray
synced 2025-03-12 06:06:39 -04:00
[Core] Remove unnecessary if judgment (#10971)
* Remove unnecessary if judgment * format code style
This commit is contained in:
parent
2a79571c29
commit
4fa6523e4e
1 changed files with 26 additions and 28 deletions
|
@ -1398,7 +1398,6 @@ void NodeManager::ProcessDisconnectClientMessage(
|
||||||
RAY_CHECK(!(is_worker && is_driver));
|
RAY_CHECK(!(is_worker && is_driver));
|
||||||
// If the client has any blocked tasks, mark them as unblocked. In
|
// If the client has any blocked tasks, mark them as unblocked. In
|
||||||
// particular, we are no longer waiting for their dependencies.
|
// particular, we are no longer waiting for their dependencies.
|
||||||
if (worker) {
|
|
||||||
if (is_worker && worker->IsDead()) {
|
if (is_worker && worker->IsDead()) {
|
||||||
// If the worker was killed by us because the driver exited,
|
// If the worker was killed by us because the driver exited,
|
||||||
// treat it as intentionally disconnected.
|
// treat it as intentionally disconnected.
|
||||||
|
@ -1422,12 +1421,11 @@ void NodeManager::ProcessDisconnectClientMessage(
|
||||||
leased_workers_.erase(worker->WorkerId());
|
leased_workers_.erase(worker->WorkerId());
|
||||||
|
|
||||||
// Publish the worker failure.
|
// Publish the worker failure.
|
||||||
auto worker_failure_data_ptr = gcs::CreateWorkerFailureData(
|
auto worker_failure_data_ptr =
|
||||||
self_node_id_, worker->WorkerId(), worker->IpAddress(), worker->Port(),
|
gcs::CreateWorkerFailureData(self_node_id_, worker->WorkerId(), worker->IpAddress(),
|
||||||
time(nullptr), intentional_disconnect);
|
worker->Port(), time(nullptr), intentional_disconnect);
|
||||||
RAY_CHECK_OK(gcs_client_->Workers().AsyncReportWorkerFailure(worker_failure_data_ptr,
|
RAY_CHECK_OK(
|
||||||
nullptr));
|
gcs_client_->Workers().AsyncReportWorkerFailure(worker_failure_data_ptr, nullptr));
|
||||||
}
|
|
||||||
|
|
||||||
if (is_worker) {
|
if (is_worker) {
|
||||||
const ActorID &actor_id = worker->GetActorId();
|
const ActorID &actor_id = worker->GetActorId();
|
||||||
|
|
Loading…
Add table
Reference in a new issue