author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 14 Aug 2007 21:59:31 +0000 (21:59 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 14 Aug 2007 21:59:31 +0000 (21:59 +0000) | ||
commit | fb8d5766f6bcf67823c2f2f650472e6527f6998e | |
tree | b10d71a2c14c3cc613abdfc5868f8f5f669d8385 | tree | snapshot |
parent | 2b88c7e1a80d58c75cb1e384f909e3b6f07a29d0 | commit | diff |
Fix for HoltWinters phase-shift bug described below.
When one or more primary data point times were missed, the SEASONAL and
DEVSEASONAL archives were marked as being up-to-date, so that they would not
be written to. It was correct not to write to these archives, but the code
failed to advance the pointers within the SEASONAL and DEVSEASONAL archives
so that future updates would go to the correct location in the archives.
Rather than mark these archives as up-to-date (by setting
rra_step_cnt[rra_idx] = 0), my patch allocates a new "skip_update" array
that is set to 1 for SEASONAL and DEVSEASONAL archives that have missed one
or more primary data points. When an RRA is written to, the cur_row pointer
advancement happens for all archives, but the skip_update array is checked
just before actually writing out the changes.
Please give it a whirl!
-- Evan Miller emiller imvu.com
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1192 a5681a0c-68f1-0310-ab6d-d61299d08faa
When one or more primary data point times were missed, the SEASONAL and
DEVSEASONAL archives were marked as being up-to-date, so that they would not
be written to. It was correct not to write to these archives, but the code
failed to advance the pointers within the SEASONAL and DEVSEASONAL archives
so that future updates would go to the correct location in the archives.
Rather than mark these archives as up-to-date (by setting
rra_step_cnt[rra_idx] = 0), my patch allocates a new "skip_update" array
that is set to 1 for SEASONAL and DEVSEASONAL archives that have missed one
or more primary data points. When an RRA is written to, the cur_row pointer
advancement happens for all archives, but the skip_update array is checked
just before actually writing out the changes.
Please give it a whirl!
-- Evan Miller emiller imvu.com
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1192 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_update.c | diff | blob | history |