go-carbon
go-carbon copied to clipboard
incorrect datapoints in cache when aggregationMethod set to sum
Hiya,
I've observed some problems when a whisper file has an aggregationMethod
of sum
. Values that are pulled from the cache are much higher than one would expect, whereas values that are pulled from disk look correct.
This seems to be the case where mutiple datapoints are being received for a timeperiod, it appears the values are summed rather than showing the last datapoint (as whisper would do).
If I update the whisperfile to use aggregationMethod
of average
, then we see a more correct looking value in line with values from disk, but I suspect is an average of the received values.
I can reproduce this behaviour with a whisper file with the following config:
$ whisper-info.py test/johanek/value.wsp
maxRetention: 157680000
xFilesFactor: 0.0
aggregationMethod: sum
fileSize: 926272
Archive 0
retention: 2419200
secondsPerPoint: 60
points: 40320
size: 483840
offset: 52
Archive 1
retention: 31536000
secondsPerPoint: 900
points: 35040
size: 420480
offset: 483892
Then send data every second or so:
while true; do echo test.johanek.value 1 $(date +%s) | nc graphite 2003; sleep 1; done
Here is a 10min chart for that timeseries:
As soon as I set the aggregationMethod
to average
, I get a "correct"-ish result:
I'm running 0.11.0 currently.
Thanks!