Fix scheduling_resources comment errors (#12991)

* Fix scheduling_resources comment error

* add part code

Co-authored-by: 灵洵 <fengbin.ffb@antgroup.com>
This commit is contained in:
fangfengbin 2020-12-20 20:20:07 +08:00 committed by GitHub
parent 038a50af52
commit 3fab93b61b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -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] =

View file

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