]> git.itanic.dy.fi Git - rrdd/commit
rrdtool: Take update time as we start updating db
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 14 Mar 2020 07:52:01 +0000 (09:52 +0200)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 14 Mar 2020 07:52:01 +0000 (09:52 +0200)
commit3d128efe07b8fef4ef1910c4532ddf9de8387a32
tree1776177b9c7322709d039d00daae3e6a3686e48a
parent4000bc3be58eda7bae56460eeb2c451a8086f05b
rrdtool: Take update time as we start updating db

Turns out commit 03aa50c69 didn't fix the drifting problem
completely. It is still possible that acquiring the data takes
arbitrarily long time and we end up inserting the data in the middle
of the database update interval, which will cause rrdtool to
interpolate the data point with previous or next entry.

Fix it by taking the timestamp before we start the update procedure
and using that time as we feed in the data.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
rrdtool.c