mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
Remove empty ClusterTaskManager::ScheduleInfeasibleTasks() (#16665)
This commit is contained in:
parent
1c709cbeb3
commit
49b8b86488
4 changed files with 3 additions and 17 deletions
|
@ -725,7 +725,6 @@ void NodeManager::WarnResourceDeadlock() {
|
||||||
// case resource_deadlock_warned_: 0 => first time, don't do anything yet
|
// case resource_deadlock_warned_: 0 => first time, don't do anything yet
|
||||||
// case resource_deadlock_warned_: 1 => second time, print a warning
|
// case resource_deadlock_warned_: 1 => second time, print a warning
|
||||||
// case resource_deadlock_warned_: >1 => global gc but don't print any warnings
|
// case resource_deadlock_warned_: >1 => global gc but don't print any warnings
|
||||||
std::ostringstream error_message;
|
|
||||||
if (any_pending && resource_deadlock_warned_++ > 0) {
|
if (any_pending && resource_deadlock_warned_++ > 0) {
|
||||||
// Actor references may be caught in cycles, preventing them from being deleted.
|
// Actor references may be caught in cycles, preventing them from being deleted.
|
||||||
// Trigger global GC to hopefully free up resource slots.
|
// Trigger global GC to hopefully free up resource slots.
|
||||||
|
@ -736,6 +735,7 @@ void NodeManager::WarnResourceDeadlock() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::ostringstream error_message;
|
||||||
error_message
|
error_message
|
||||||
<< "The actor or task with ID " << exemplar.GetTaskSpecification().TaskId()
|
<< "The actor or task with ID " << exemplar.GetTaskSpecification().TaskId()
|
||||||
<< " cannot be scheduled right now. It requires "
|
<< " cannot be scheduled right now. It requires "
|
||||||
|
@ -905,7 +905,7 @@ void NodeManager::ResourceCreateUpdated(const NodeID &node_id,
|
||||||
|
|
||||||
if (node_id == self_node_id_) {
|
if (node_id == self_node_id_) {
|
||||||
// The resource update is on the local node, check if we can reschedule tasks.
|
// The resource update is on the local node, check if we can reschedule tasks.
|
||||||
cluster_task_manager_->ScheduleInfeasibleTasks();
|
cluster_task_manager_->ScheduleAndDispatchTasks();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1290,7 +1290,7 @@ void NodeManager::DisconnectClient(
|
||||||
// Return the resources that were being used by this worker.
|
// Return the resources that were being used by this worker.
|
||||||
cluster_task_manager_->ReleaseWorkerResources(worker);
|
cluster_task_manager_->ReleaseWorkerResources(worker);
|
||||||
|
|
||||||
// Since some resources may have been released, we can try to dispatch more tasks. YYY
|
// Since some resources may have been released, we can try to dispatch more tasks.
|
||||||
cluster_task_manager_->ScheduleAndDispatchTasks();
|
cluster_task_manager_->ScheduleAndDispatchTasks();
|
||||||
} else if (is_driver) {
|
} else if (is_driver) {
|
||||||
// The client is a driver.
|
// The client is a driver.
|
||||||
|
@ -1640,7 +1640,6 @@ void NodeManager::HandleCommitBundleResources(
|
||||||
placement_group_resource_manager_->CommitBundle(bundle_spec);
|
placement_group_resource_manager_->CommitBundle(bundle_spec);
|
||||||
send_reply_callback(Status::OK(), nullptr, nullptr);
|
send_reply_callback(Status::OK(), nullptr, nullptr);
|
||||||
|
|
||||||
cluster_task_manager_->ScheduleInfeasibleTasks();
|
|
||||||
cluster_task_manager_->ScheduleAndDispatchTasks();
|
cluster_task_manager_->ScheduleAndDispatchTasks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1675,7 +1674,6 @@ void NodeManager::HandleCancelResourceReserve(
|
||||||
|
|
||||||
// Return bundle resources.
|
// Return bundle resources.
|
||||||
placement_group_resource_manager_->ReturnBundle(bundle_spec);
|
placement_group_resource_manager_->ReturnBundle(bundle_spec);
|
||||||
cluster_task_manager_->ScheduleInfeasibleTasks();
|
|
||||||
cluster_task_manager_->ScheduleAndDispatchTasks();
|
cluster_task_manager_->ScheduleAndDispatchTasks();
|
||||||
send_reply_callback(Status::OK(), nullptr, nullptr);
|
send_reply_callback(Status::OK(), nullptr, nullptr);
|
||||||
}
|
}
|
||||||
|
@ -1900,7 +1898,6 @@ void NodeManager::FinishAssignedActorCreationTask(WorkerInterface &worker,
|
||||||
auto job_config = worker_pool_.GetJobConfig(job_id);
|
auto job_config = worker_pool_.GetJobConfig(job_id);
|
||||||
RAY_CHECK(job_config);
|
RAY_CHECK(job_config);
|
||||||
runtime_env_manager_.AddURIReference(actor_id.Hex(), job_config->runtime_env());
|
runtime_env_manager_.AddURIReference(actor_id.Hex(), job_config->runtime_env());
|
||||||
;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -302,11 +302,6 @@ void ClusterTaskManager::QueueAndScheduleTask(
|
||||||
ScheduleAndDispatchTasks();
|
ScheduleAndDispatchTasks();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClusterTaskManager::ScheduleInfeasibleTasks() {
|
|
||||||
// Do nothing.
|
|
||||||
// TODO(Shanly): This method will be removed once we remove the legacy scheduler.
|
|
||||||
}
|
|
||||||
|
|
||||||
void ClusterTaskManager::TasksUnblocked(const std::vector<TaskID> &ready_ids) {
|
void ClusterTaskManager::TasksUnblocked(const std::vector<TaskID> &ready_ids) {
|
||||||
if (ready_ids.empty()) {
|
if (ready_ids.empty()) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -76,9 +76,6 @@ class ClusterTaskManager : public ClusterTaskManagerInterface {
|
||||||
void QueueAndScheduleTask(const Task &task, rpc::RequestWorkerLeaseReply *reply,
|
void QueueAndScheduleTask(const Task &task, rpc::RequestWorkerLeaseReply *reply,
|
||||||
rpc::SendReplyCallback send_reply_callback) override;
|
rpc::SendReplyCallback send_reply_callback) override;
|
||||||
|
|
||||||
/// Schedule infeasible tasks.
|
|
||||||
void ScheduleInfeasibleTasks() override;
|
|
||||||
|
|
||||||
/// Move tasks from waiting to ready for dispatch. Called when a task's
|
/// Move tasks from waiting to ready for dispatch. Called when a task's
|
||||||
/// dependencies are resolved.
|
/// dependencies are resolved.
|
||||||
///
|
///
|
||||||
|
|
|
@ -99,9 +99,6 @@ class ClusterTaskManagerInterface {
|
||||||
virtual void QueueAndScheduleTask(const Task &task, rpc::RequestWorkerLeaseReply *reply,
|
virtual void QueueAndScheduleTask(const Task &task, rpc::RequestWorkerLeaseReply *reply,
|
||||||
rpc::SendReplyCallback send_reply_callback) = 0;
|
rpc::SendReplyCallback send_reply_callback) = 0;
|
||||||
|
|
||||||
/// Schedule infeasible tasks.
|
|
||||||
virtual void ScheduleInfeasibleTasks() = 0;
|
|
||||||
|
|
||||||
/// Return if any tasks are pending resource acquisition.
|
/// Return if any tasks are pending resource acquisition.
|
||||||
///
|
///
|
||||||
/// \param[in] exemplar An example task that is deadlocking.
|
/// \param[in] exemplar An example task that is deadlocking.
|
||||||
|
|
Loading…
Add table
Reference in a new issue