graphite-project/whisper — pull request #10 by slackhappy (2012-09-10 19:25:46+00:00)
Title: invert order of whisper-merge

I ran into a bug when running a backfill
using whisper merge. The problem is that it
chooses the longest (in terms of timespan)
archive, and works its way to the shortest.

This prevents longer, less granular archives from being
filled in using the aggregationMethod as applied
to the shorter, more granular archives.

There was also a subtle bug that could occur if the real
clock changes while the merge is in progress. This
could cause the wrong archive to be picked.

This change also protects the user from merge scenarios
that haven't been carefully considered. Clearly,
some merge scenarios between differing archive
configurations are valid, but careful analysis
is important.