You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For asPercent, if total is specified and it is a list of the same length as seriesList, but the length of each series' values is longer than the length of each totalSeries values, the following panic is occurring:
recovered from panic: \"runtime error: index out of range [5] with length 5
This is occurring when total[n].Values[i] is accessed, when i is an index greater than the length of total[n].Values.
In Graphite web, this situation is prevented by the following:
When izip_longest() is called in Python, if the series are different lengths, then None will be used for the value for that series' item in the tuple. Then safeDiv will return None for the value if one of the series has a value of None.
To fix this issue in CarbonAPI, the percentage calculates for seriesList should stop at the point where it exceeds the length of totalSeries values and then math.NaN() should be assigned to the remaining values.
The text was updated successfully, but these errors were encountered:
For asPercent, if total is specified and it is a list of the same length as seriesList, but the length of each series' values is longer than the length of each totalSeries values, the following panic is occurring:
recovered from panic: \"runtime error: index out of range [5] with length 5
This is occurring when total[n].Values[i] is accessed, when i is an index greater than the length of total[n].Values.
In Graphite web, this situation is prevented by the following:
https://github.com/graphite-project/graphite-web/blob/b52987ac97f49dcfb401a21d4b92860cfcbcf074/webapp/graphite/render/functions.py#L1041
When izip_longest() is called in Python, if the series are different lengths, then None will be used for the value for that series' item in the tuple. Then safeDiv will return None for the value if one of the series has a value of None.
To fix this issue in CarbonAPI, the percentage calculates for seriesList should stop at the point where it exceeds the length of totalSeries values and then math.NaN() should be assigned to the remaining values.
The text was updated successfully, but these errors were encountered: