From: Costa Tsaousis (ktsaou) Date: Thu, 19 Mar 2015 09:19:15 +0000 (+0200) Subject: detect too big updates correctly X-Git-Tag: v0.2~68 X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;h=a5cbaf4c29bcaf61ce4f2bde396da18b36e10c27;p=netdata.git detect too big updates correctly --- diff --git a/src/rrd.c b/src/rrd.c index 8653bef2..d2f525de 100755 --- a/src/rrd.c +++ b/src/rrd.c @@ -645,7 +645,7 @@ unsigned long long rrd_stats_done(RRD_STATS *st) // a read lock is OK here pthread_rwlock_rdlock(&st->rwlock); - if(st->usec_since_last_update > st->entries * st->update_every * 1000000ULL) { + if(st->usec_since_last_update > st->entries * st->update_every * 1000000ULL || usecdiff(&st->last_collected_time, &st->last_updated) > st->entries * st->update_every * 1000000ULL) { info("History of chart %s too old. Reseting chart.", st->name); rrd_stats_reset(st); st->usec_since_last_update = st->update_every * 1000000ULL;