@cryptotaxi247 / netdata-1 / commits / 991d5b025

database: fix endless loop when cleaning obsolete charts (#10236)

Thank you very much @hexchain !

hexchain committed Nov 15, 2020 at 18:27 UTC 991d5b0257c1f1c74df3bfb979fc609034c20987
1 file changed +4 -1
database/rrdhost.c
+4 -1
@@ -1528,8 +1528,11 @@ restart_after_removal:
1528 while (st->alarms) rrdsetcalc_unlink(st->alarms);
1529 rrdset_wrlock(st);
1530 for (rd = st->dimensions, last = NULL ; likely(rd) ; ) {
1531 - if (rrddim_flag_check(rd, RRDDIM_FLAG_ARCHIVED))
1531 + if (rrddim_flag_check(rd, RRDDIM_FLAG_ARCHIVED)) {
1532 + last = rd;
1533 + rd = rd->next;
1534 continue;
1535 + }
1536
1537 rrddim_flag_set(rd, RRDDIM_FLAG_ARCHIVED);
1538 while (rd->variables)