graphite-project/graphite-web — pull request #982 by andrewbaxter (2014-10-06 02:40:30+00:00)
Title: Handle missing divisor series in divideSeries gracefully.

If all the data points for a series go out of scope then the series effectively disappears, with datalib.fetchData returning an empty series list. This caused divideSeries to throw an exception. In practice, graphs would suddenly stop rendering if they contained at least one divideSeries expression with data that got too old.

This is a minimal fix - None values are generated on the fly when required by divideSeries. Since the divisorSeries is empty, we can't get the path expression for labeling. A better fix (I think) would be to have datalib.findData return the series, but with all None data points. I'm not sure how much work that would involve or how much would break, where the current behavior is expected.