do not clear the database when it refers to the future
Costa Tsaousis (ktsaou) committed
Sep 5, 2018 at 13:18 UTC
862f1862184c0df1fb8d13dc481493e473895ef7
1 file changed
+2
-2
src/rrdset.c
+2
-2
@@ -588,8 +588,8 @@ RRDSET *rrdset_create_custom(
588
memset(st, 0, size);
589
}
590
else if(st->last_updated.tv_sec > now + update_every) {
591
- error("File %s refers to the future. Clearing it.", fullfilename);
592
- memset(st, 0, size);
591
+ error("File %s refers to the future by %zd secs. Resetting it to now.", fullfilename, (ssize_t)(st->last_updated.tv_sec - now));
592
+ st->last_updated.tv_sec = now;
593
}
594
595
// make sure the database is aligned