Details
-
Bug
-
Status: Patch Available
-
Minor
-
Resolution: Unresolved
-
3.0.0-alpha4
-
None
-
None
-
None
Description
Currently DominantResourceCalculator#ratio may return wrong result when right resource contains zero value. For example, there are three resource types such as <memory-mb, vcores, vssd>, leftResource=<5, 5, 0> and rightResource=<10, 10, 0>, we expect the result of DominantResourceCalculator#ratio(leftResource, rightResource) is 0.5 but currently is NaN.
There should be a verification before divide calculation to ensure that dividend is not zero.