summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cae0923)
raw | patch | inline | side by side (parent: cae0923)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 8 Aug 2009 09:28:43 +0000 (09:28 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 8 Aug 2009 09:28:43 +0000 (09:28 +0000) |
often than necessary. The problem was introduced in r1600. --kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1881 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1881 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_daemon.c | patch | blob | history |
index 36701f892ffedea1533c87f32c6a4925c9e641ef..2a35ec2abe59cfc2f87a316a0e097c051879a98d 100644 (file)
--- a/program/src/rrd_daemon.c
+++ b/program/src/rrd_daemon.c
|| ((now.tv_sec == next_flush.tv_sec)
&& ((1000 * now.tv_usec) > next_flush.tv_nsec)))
{
+ RRDD_LOG(LOG_DEBUG, "flushing old values");
+
+ /* Determine the time of the next cache flush. */
+ next_flush.tv_sec = now.tv_sec + config_flush_interval;
+
/* Flush all values that haven't been written in the last
* `config_write_interval' seconds. */
flush_old_values (config_write_interval);
- /* Determine the time of the next cache flush. */
- next_flush.tv_sec =
- now.tv_sec + next_flush.tv_sec % config_flush_interval;
-
/* unlock the cache while we rotate so we don't block incoming
* updates if the fsync() blocks on disk I/O */
pthread_mutex_unlock(&cache_lock);