0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-14 09:38:34 +00:00

Remove host immediately on stale node removal ()

This commit is contained in:
Stelios Fragkakis 2024-08-20 12:43:03 +03:00 committed by GitHub
parent b189ee43f4
commit 7160892c0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -382,6 +382,9 @@ static cmd_status_t cmd_remove_node(char *args, char **message)
freez(host->node_id);
host->node_id = NULL;
buffer_sprintf(wb, "Unregistering node with machine guid %s, hostname = %s", host->machine_guid, rrdhost_hostname(host));
rrd_wrlock();
rrdhost_free___while_having_rrd_wrlock(host, true);
rrd_wrunlock();
}
else
buffer_sprintf(wb, "Node with machine guid %s, hostname = %s is already unregistered", host->machine_guid, rrdhost_hostname(host));