diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2022-09-16 16:45:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-16 16:45:59 +0300 |
commit | 6a82d7bd25dc5db25d2d708b5444e01f211390e2 (patch) | |
tree | db0c839f56f392be2ac0ca92c90a9852af2e72b1 | |
parent | d70640d8803d667966bbcf5ca7d59ee47b96988d (diff) |
fix typo not deleting collected flag; force removing collected flag on child disconnect (#13672)
-rw-r--r-- | database/rrdcontext.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/database/rrdcontext.c b/database/rrdcontext.c index b743ffb6ef..4a77fea1b4 100644 --- a/database/rrdcontext.c +++ b/database/rrdcontext.c @@ -182,7 +182,7 @@ rrd_flag_add_remove_atomic(RRD_FLAGS *flags, RRD_FLAGS check, RRD_FLAGS conditio \ /* always remove these flags */ \ , RRD_FLAG_ARCHIVED \ - | RRD_FLAG_DELETED \ + | RRD_FLAG_COLLECTED \ ) #define rrd_flag_is_collected(obj) rrd_flag_check(obj, RRD_FLAG_COLLECTED) @@ -2448,6 +2448,11 @@ static void rrdmetric_process_updates(RRDMETRIC *rm, bool force, RRD_FLAGS reaso if(worker_jobs) worker_is_busy(WORKER_JOB_PP_METRIC); + if(reason == RRD_FLAG_UPDATE_REASON_DISCONNECTED_CHILD) { + rrd_flag_set_archived(rm); + rrd_flag_set(rm, RRD_FLAG_UPDATE_REASON_DISCONNECTED_CHILD); + } + rrdmetric_update_retention(rm); rrd_flag_unset_updated(rm); |