huawei-cloudnative / firmament

The Firmament cluster scheduling platform
http://www.firmament.io
Apache License 2.0
19 stars 9 forks source link

Check on arc->cap_upper_bound_ is done in ChangeArc, this should have been in AddArc #32

Open shivramsrivastava opened 5 years ago

shivramsrivastava commented 5 years ago

There is arc->cap_upperbound in change arc function "CHECK_GE(arc->cap_upperbound, 0); " this check should have been done in AddArc function before adding this value to the arc.

In current function we can have same check on incoming value to check the validity of incoming value cap_upper_bound like CHECK_GE(cap_upper_bound, 0);.