diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 17:33:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 17:34:10 +0000 |
commit | 83ba6762cc43d9db581b979bb5e3445669e46cc2 (patch) | |
tree | 2e69833b43f791ed253a7a20318b767ebe56cdb8 /src/daemon/service.c | |
parent | Releasing debian version 1.47.5-1. (diff) | |
download | netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.tar.xz netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.zip |
Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/daemon/service.c')
-rw-r--r-- | src/daemon/service.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/daemon/service.c b/src/daemon/service.c index ead633445..f209cb470 100644 --- a/src/daemon/service.c +++ b/src/daemon/service.c @@ -203,7 +203,7 @@ static void svc_rrd_cleanup_obsolete_charts_from_all_hosts() { if (host == localhost) continue; - netdata_mutex_lock(&host->receiver_lock); + spinlock_lock(&host->receiver_lock); time_t now = now_realtime_sec(); @@ -215,7 +215,7 @@ static void svc_rrd_cleanup_obsolete_charts_from_all_hosts() { host->trigger_chart_obsoletion_check = 0; } - netdata_mutex_unlock(&host->receiver_lock); + spinlock_unlock(&host->receiver_lock); } rrd_rdunlock(); @@ -247,14 +247,12 @@ restart_after_removal: } worker_is_busy(WORKER_JOB_FREE_HOST); -#ifdef ENABLE_ACLK // in case we have cloud connection we inform cloud // a child disconnected - if (netdata_cloud_enabled && force) { + if (force) { aclk_host_state_update(host, 0, 0); unregister_node(host->machine_guid); } -#endif rrdhost_free___while_having_rrd_wrlock(host, force); goto restart_after_removal; } @@ -299,7 +297,7 @@ void *service_main(void *ptr) CLEANUP_FUNCTION_REGISTER(service_main_cleanup) cleanup_ptr = ptr; heartbeat_t hb; - heartbeat_init(&hb); + heartbeat_init(&hb, USEC_PER_SEC); usec_t step = USEC_PER_SEC * SERVICE_HEARTBEAT; usec_t real_step = USEC_PER_SEC; @@ -307,7 +305,7 @@ void *service_main(void *ptr) while (service_running(SERVICE_MAINTENANCE)) { worker_is_idle(); - heartbeat_next(&hb, USEC_PER_SEC); + heartbeat_next(&hb); if (real_step < step) { real_step += USEC_PER_SEC; continue; |