summaryrefslogtreecommitdiffstats
path: root/database/rrdhost.c
diff options
context:
space:
mode:
authorTimotej S <6674623+underhood@users.noreply.github.com>2020-08-26 14:50:37 +0200
committerGitHub <noreply@github.com>2020-08-26 14:50:37 +0200
commitab7ff3131f3698710e0bd9fa3c66d31a3a194725 (patch)
treea78efc8cc829c2519b69e73e24d74e713c5105bb /database/rrdhost.c
parenta11d33bba77043b28cf2b0dac4989cd189c635b2 (diff)
Adds claimed_id streaming (#9804)
* streams claimed_id of child nodes to parents * adds this information into /api/v1/info
Diffstat (limited to 'database/rrdhost.c')
-rw-r--r--database/rrdhost.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/database/rrdhost.c b/database/rrdhost.c
index d82a9099b4..08bdb1b3ba 100644
--- a/database/rrdhost.c
+++ b/database/rrdhost.c
@@ -167,6 +167,8 @@ RRDHOST *rrdhost_create(const char *hostname,
netdata_rwlock_init(&host->rrdhost_rwlock);
netdata_rwlock_init(&host->labels_rwlock);
+ netdata_mutex_init(&host->claimed_id_lock);
+
rrdhost_init_hostname(host, hostname);
rrdhost_init_machine_guid(host, guid);
@@ -858,6 +860,8 @@ void rrdhost_free(RRDHOST *host) {
// ------------------------------------------------------------------------
// free it
+ pthread_mutex_destroy(&host->claimed_id_lock);
+ freez(host->claimed_id);
freez((void *)host->tags);
free_host_labels(host->labels);
freez((void *)host->os);