Remove empty ClusterTaskManager::ScheduleInfeasibleTasks() (#16665)

This commit is contained in:
mwtian 2021-06-24 22:34:57 -07:00 committed by GitHub
parent 1c709cbeb3
commit 49b8b86488
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 17 deletions

View file

@ -725,7 +725,6 @@ void NodeManager::WarnResourceDeadlock() {
// 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 => global gc but don't print any warnings
std::ostringstream error_message;
if (any_pending && resource_deadlock_warned_++ > 0) {
// Actor references may be caught in cycles, preventing them from being deleted.
// Trigger global GC to hopefully free up resource slots.
@ -736,6 +735,7 @@ void NodeManager::WarnResourceDeadlock() {
return;
}
std::ostringstream error_message;
error_message
<< "The actor or task with ID " << exemplar.GetTaskSpecification().TaskId()
<< " cannot be scheduled right now. It requires "
@ -905,7 +905,7 @@ void NodeManager::ResourceCreateUpdated(const NodeID &node_id,
if (node_id == self_node_id_) {
// 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.
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();
} else if (is_driver) {
// The client is a driver.
@ -1640,7 +1640,6 @@ void NodeManager::HandleCommitBundleResources(
placement_group_resource_manager_->CommitBundle(bundle_spec);
send_reply_callback(Status::OK(), nullptr, nullptr);
cluster_task_manager_->ScheduleInfeasibleTasks();
cluster_task_manager_->ScheduleAndDispatchTasks();
}
@ -1675,7 +1674,6 @@ void NodeManager::HandleCancelResourceReserve(
// Return bundle resources.
placement_group_resource_manager_->ReturnBundle(bundle_spec);
cluster_task_manager_->ScheduleInfeasibleTasks();
cluster_task_manager_->ScheduleAndDispatchTasks();
send_reply_callback(Status::OK(), nullptr, nullptr);
}
@ -1900,7 +1898,6 @@ void NodeManager::FinishAssignedActorCreationTask(WorkerInterface &worker,
auto job_config = worker_pool_.GetJobConfig(job_id);
RAY_CHECK(job_config);
runtime_env_manager_.AddURIReference(actor_id.Hex(), job_config->runtime_env());
;
}
}

View file

@ -302,11 +302,6 @@ void ClusterTaskManager::QueueAndScheduleTask(
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) {
if (ready_ids.empty()) {
return;

View file

@ -76,9 +76,6 @@ class ClusterTaskManager : public ClusterTaskManagerInterface {
void QueueAndScheduleTask(const Task &task, rpc::RequestWorkerLeaseReply *reply,
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
/// dependencies are resolved.
///

View file

@ -99,9 +99,6 @@ class ClusterTaskManagerInterface {
virtual void QueueAndScheduleTask(const Task &task, rpc::RequestWorkerLeaseReply *reply,
rpc::SendReplyCallback send_reply_callback) = 0;
/// Schedule infeasible tasks.
virtual void ScheduleInfeasibleTasks() = 0;
/// Return if any tasks are pending resource acquisition.
///
/// \param[in] exemplar An example task that is deadlocking.