From 3fab93b61b4b88dfe5a5d931605d18ce756fe1a8 Mon Sep 17 00:00:00 2001 From: fangfengbin <869218239a@zju.edu.cn> Date: Sun, 20 Dec 2020 20:20:07 +0800 Subject: [PATCH] Fix scheduling_resources comment errors (#12991) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix scheduling_resources comment error * add part code Co-authored-by: 灵洵 --- src/ray/common/task/scheduling_resources.cc | 4 ++-- src/ray/common/task/scheduling_resources.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ray/common/task/scheduling_resources.cc b/src/ray/common/task/scheduling_resources.cc index db7be28b6..a90e13667 100644 --- a/src/ray/common/task/scheduling_resources.cc +++ b/src/ray/common/task/scheduling_resources.cc @@ -200,8 +200,8 @@ void ResourceSet::AddResourcesCapacityConstrained(const ResourceSet &other, const FractionalResourceQuantity &to_add_resource_capacity = resource_pair.second; if (total_resource_map.count(to_add_resource_label) != 0) { // If resource exists in total map, add to the local capacity map. - // If the new capacity will be greater the total capacity, set the new capacity to - // total capacity (capping to the total) + // If the new capacity is less than the total capacity, set the new capacity to + // the local capacity (capping to the total). const FractionalResourceQuantity &total_capacity = total_resource_map.at(to_add_resource_label); resource_capacity_[to_add_resource_label] = diff --git a/src/ray/common/task/scheduling_resources.h b/src/ray/common/task/scheduling_resources.h index 41ed07a1c..6093d8f13 100644 --- a/src/ray/common/task/scheduling_resources.h +++ b/src/ray/common/task/scheduling_resources.h @@ -136,8 +136,7 @@ class ResourceSet { /// /// \param other: The other resource set to add. /// \param total_resources: Total resource set which sets upper limits on capacity for - /// each label. \return True if the resource set was added successfully. False - /// otherwise. + /// each label. void AddResourcesCapacityConstrained(const ResourceSet &other, const ResourceSet &total_resources);