metrictank
metrictank copied to clipboard
Importer schema conversion logic should be smarter when converting between combos of intervals that are not cleanly divisible
Currently when the schema conversion logic converts from a schema combination where multiple input archives have a long enough retention to cover the retention of the output archive, then it will choose to use the one which has the largest retention and also has an interval which is lower or equal to the one of the output archive.
This choice may not be optimal if the interval of the output archive is not cleanly divisible by the interval of the chosen input archive, while actually there are also other input archives available which could cover the desired retention and which have an interval that cleanly divides the output interval.
Example
dest: 4h:1y
src: 1h:2y,3h:3y
The current logic would chose the src archive 3h:3y
as input to generate the archive 4h:1y
, but the result would be more accurate if it would use 1h:2y
because 4h
is cleanly divisible by 1h
.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.