@cryptotaxi247 / netdata-1 / commits / f73c0a517

Child should be online before initializing health (#19463)

Stelios Fragkakis committed Jan 23, 2025 at 15:29 UTC f73c0a51734f2d06da76cadbbd6002333dad6789
1 file changed +3 -4
src/database/rrdhost.c
+3 -4
@@ -714,7 +714,7 @@ RRDHOST *rrdhost_find_or_create(
714 , system_info
715 , 0
716 , archived
717 - );
717 + );
718 }
719 else {
720 if (likely(!rrdhost_flag_check(host, RRDHOST_FLAG_PENDING_CONTEXT_LOAD)))
@@ -765,9 +765,8 @@ bool rrdhost_should_be_removed(RRDHOST *host, RRDHOST *protected_host, time_t no
765 }
766
767 bool rrdhost_should_run_health(RRDHOST *host) {
768 - if (!host->health.enabled ||
769 - !rrdhost_flag_check(host, RRDHOST_FLAG_COLLECTOR_ONLINE) ||
770 - rrdhost_flag_check(host, RRDHOST_FLAG_ORPHAN))
768 + if (!host->health.enabled || !rrdhost_flag_check(host, RRDHOST_FLAG_COLLECTOR_ONLINE) ||
769 + rrdhost_flag_check(host, RRDHOST_FLAG_ORPHAN) || rrdhost_ingestion_status(host) != RRDHOST_INGEST_STATUS_ONLINE)
770 return false;
771
772 return true;