summaryrefslogtreecommitdiffstats
path: root/database/rrdhost.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-26 18:05:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-26 18:05:42 +0000
commit112b5b91647c3dea45cc1c9bc364df526c8012f1 (patch)
tree450af925135ec664c4310a1eb28b69481094ee2a /database/rrdhost.c
parentReleasing debian version 1.32.1-2. (diff)
downloadnetdata-112b5b91647c3dea45cc1c9bc364df526c8012f1.tar.xz
netdata-112b5b91647c3dea45cc1c9bc364df526c8012f1.zip
Merging upstream version 1.33.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'database/rrdhost.c')
-rw-r--r--database/rrdhost.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/database/rrdhost.c b/database/rrdhost.c
index d9608b74..79e283a6 100644
--- a/database/rrdhost.c
+++ b/database/rrdhost.c
@@ -382,7 +382,19 @@ RRDHOST *rrdhost_create(const char *hostname,
else localhost = host;
}
+ // ------------------------------------------------------------------------
+ // init new ML host and update system_info to let upstreams know
+ // about ML functionality
+
ml_new_host(host);
+ if (is_localhost && host->system_info) {
+#ifndef ENABLE_ML
+ host->system_info->ml_capable = 0;
+#else
+ host->system_info->ml_capable = 1;
+#endif
+ host->system_info->ml_enabled = host->ml_host != NULL;
+ }
info("Host '%s' (at registry as '%s') with guid '%s' initialized"
", os '%s'"
@@ -839,6 +851,10 @@ void rrdhost_free(RRDHOST *host) {
rrdpush_sender_thread_stop(host); // stop a possibly running thread
cbuffer_free(host->sender->buffer);
buffer_free(host->sender->build);
+#ifdef ENABLE_COMPRESSION
+ if (host->sender->compressor)
+ host->sender->compressor->destroy(&host->sender->compressor);
+#endif
freez(host->sender);
host->sender = NULL;
if (netdata_exit) {
@@ -938,6 +954,7 @@ void rrdhost_free(RRDHOST *host) {
pthread_mutex_destroy(&host->aclk_state_lock);
freez(host->aclk_state.claimed_id);
+ freez(host->aclk_state.prev_claimed_id);
freez((void *)host->tags);
free_label_list(host->labels.head);
freez((void *)host->os);