From eb53d1fe877874a69ba36de0c1be29405cb12a6e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 18 Sep 2023 17:47:41 +0200 Subject: Merging upstream version 1.42.4. Signed-off-by: Daniel Baumann --- database/rrd.h | 2 ++ database/rrdcalc.c | 1 + 2 files changed, 3 insertions(+) (limited to 'database') diff --git a/database/rrd.h b/database/rrd.h index d64f5904a..11f3aa98c 100644 --- a/database/rrd.h +++ b/database/rrd.h @@ -769,6 +769,8 @@ typedef enum __attribute__ ((__packed__)) rrdset_flags { RRDSET_FLAG_UPSTREAM_SEND_VARIABLES = (1 << 26), // a custom variable has been updated and needs to be exposed to parent RRDSET_FLAG_COLLECTION_FINISHED = (1 << 27), // when set, data collection is not available for this chart + + RRDSET_FLAG_HAS_RRDCALC_LINKED = (1 << 28), // this chart has at least one rrdcal linked } RRDSET_FLAGS; #define rrdset_flag_check(st, flag) (__atomic_load_n(&((st)->flags), __ATOMIC_SEQ_CST) & (flag)) diff --git a/database/rrdcalc.c b/database/rrdcalc.c index 8e41df8d6..398ddb32b 100644 --- a/database/rrdcalc.c +++ b/database/rrdcalc.c @@ -316,6 +316,7 @@ static void rrdcalc_link_to_rrdset(RRDSET *st, RRDCALC *rc) { rc->ae = ae; health_alarm_log_add_entry(host, ae); + rrdset_flag_set(st, RRDSET_FLAG_HAS_RRDCALC_LINKED); } static void rrdcalc_unlink_from_rrdset(RRDCALC *rc, bool having_ll_wrlock) { -- cgit v1.2.3