summaryrefslogtreecommitdiffstats
path: root/database/rrdcalc.c
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2020-12-14 17:27:55 +0300
committerGitHub <noreply@github.com>2020-12-14 17:27:55 +0300
commit0f8175dd3060691394e263cdab01c8f940b1b5d3 (patch)
tree4b14cd6b7e6ba7797eeec4c74b4c4c35cdad4494 /database/rrdcalc.c
parent7bfa8c8eba72a109d940b1fa5c7acaed9cd7a52c (diff)
Kubernetes labels (#10107)
Co-authored-by: Markos Fountoulakis <markos.fountoulakis.senior@gmail.com> Co-authored-by: Vladimir Kobal <vlad@prokk.net>
Diffstat (limited to 'database/rrdcalc.c')
-rw-r--r--database/rrdcalc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/database/rrdcalc.c b/database/rrdcalc.c
index a057841373..935ee9c055 100644
--- a/database/rrdcalc.c
+++ b/database/rrdcalc.c
@@ -651,7 +651,7 @@ static void rrdcalc_labels_unlink_alarm_loop(RRDHOST *host, RRDCALC *alarms) {
}
char cmp[CONFIG_FILE_LINE_MAX+1];
- struct label *move = host->labels;
+ struct label *move = host->labels.head;
while(move) {
snprintf(cmp, CONFIG_FILE_LINE_MAX, "%s=%s", move->key, move->value);
if (simple_pattern_matches(rc->splabels, move->key) ||
@@ -682,12 +682,12 @@ static void rrdcalc_labels_unlink_alarm_loop(RRDHOST *host, RRDCALC *alarms) {
void rrdcalc_labels_unlink_alarm_from_host(RRDHOST *host) {
rrdhost_check_rdlock(host);
- netdata_rwlock_rdlock(&host->labels_rwlock);
+ netdata_rwlock_rdlock(&host->labels.labels_rwlock);
rrdcalc_labels_unlink_alarm_loop(host, host->alarms);
rrdcalc_labels_unlink_alarm_loop(host, host->alarms_with_foreach);
- netdata_rwlock_unlock(&host->labels_rwlock);
+ netdata_rwlock_unlock(&host->labels.labels_rwlock);
}
void rrdcalc_labels_unlink() {
@@ -698,7 +698,7 @@ void rrdcalc_labels_unlink() {
if (unlikely(!host->health_enabled))
continue;
- if (host->labels) {
+ if (host->labels.head) {
rrdhost_wrlock(host);
rrdcalc_labels_unlink_alarm_from_host(host);