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);