@cryptotaxi247 / netdata-1 / commits / 46ad4ff72

Schedule next rotation based on absolute time (#13531)

schedule rotation_after based on now

Emmanuel Vasilakis committed Aug 18, 2022 at 16:46 UTC 46ad4ff7279d8406519fba2056d6b6f7e84d8448
1 file changed +1 -1
database/sqlite/sqlite_aclk.c
+1 -1
@@ -426,7 +426,7 @@ static void timer_cb(uv_timer_t* handle)
426 if (wc->rotation_after && wc->rotation_after < now) {
427 cmd.opcode = ACLK_DATABASE_UPD_RETENTION;
428 if (!aclk_database_enq_cmd_noblock(wc, &cmd))
429 - wc->rotation_after += ACLK_DATABASE_ROTATION_INTERVAL;
429 + wc->rotation_after = now + ACLK_DATABASE_ROTATION_INTERVAL;
430 }
431
432 if (wc->chart_updates && !wc->chart_pending && wc->chart_payload_count) {