@cryptotaxi247 / netdata-1 / commits / 03fe3d570

chore: reduce logging in rrdset (#12739)

Ilya Mashchenko committed Apr 26, 2022 at 11:50 UTC 03fe3d5703e30207524fcdfac6e0eec5fb90ee56
1 file changed +4
database/rrdset.c
+4
@@ -1004,7 +1004,9 @@ inline void rrdset_next_usec(RRDSET *st, usec_t microseconds) {
1004
1005 if(unlikely(since_last_usec < 0)) {
1006 // oops! the database is in the future
1007 + #ifdef NETDATA_INTERNAL_CHECKS
1008 info("RRD database for chart '%s' on host '%s' is %0.5" LONG_DOUBLE_MODIFIER " secs in the future (counter #%zu, update #%zu). Adjusting it to current time.", st->id, st->rrdhost->hostname, (LONG_DOUBLE)-since_last_usec / USEC_PER_SEC, st->counter, st->counter_done);
1009 + #endif
1010
1011 st->last_collected_time.tv_sec = now.tv_sec - st->update_every;
1012 st->last_collected_time.tv_usec = now.tv_usec;
@@ -1021,7 +1023,9 @@ inline void rrdset_next_usec(RRDSET *st, usec_t microseconds) {
1023 }
1024 else if(unlikely((usec_t)since_last_usec > (usec_t)(st->update_every * 5 * USEC_PER_SEC))) {
1025 // oops! the database is too far behind
1026 + #ifdef NETDATA_INTERNAL_CHECKS
1027 info("RRD database for chart '%s' on host '%s' is %0.5" LONG_DOUBLE_MODIFIER " secs in the past (counter #%zu, update #%zu). Adjusting it to current time.", st->id, st->rrdhost->hostname, (LONG_DOUBLE)since_last_usec / USEC_PER_SEC, st->counter, st->counter_done);
1028 + #endif
1029
1030 microseconds = (usec_t)since_last_usec;
1031 #ifdef NETDATA_INTERNAL_CHECKS