summaryrefslogtreecommitdiffstats
path: root/database/rrdset.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-19 12:33:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-19 12:33:59 +0000
commit1ee0c09c5742557e037df5421ca62abddb90ae22 (patch)
tree71c0fa48bb6d31d036c9badd7e038527f90d1a73 /database/rrdset.c
parentReleasing debian version 1.30.1-1. (diff)
downloadnetdata-1ee0c09c5742557e037df5421ca62abddb90ae22.tar.xz
netdata-1ee0c09c5742557e037df5421ca62abddb90ae22.zip
Merging upstream version 1.31.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'database/rrdset.c')
-rw-r--r--database/rrdset.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/database/rrdset.c b/database/rrdset.c
index 15640d3ed..fd6605dff 100644
--- a/database/rrdset.c
+++ b/database/rrdset.c
@@ -175,6 +175,8 @@ int rrdset_set_name(RRDSET *st, const char *name) {
if(unlikely(rrdset_index_add_name(host, st) != st))
error("RRDSET: INTERNAL ERROR: attempted to index duplicate chart name '%s'", st->name);
+ rrdset_flag_clear(st, RRDSET_FLAG_EXPORTING_SEND);
+ rrdset_flag_clear(st, RRDSET_FLAG_EXPORTING_IGNORE);
rrdset_flag_clear(st, RRDSET_FLAG_BACKEND_SEND);
rrdset_flag_clear(st, RRDSET_FLAG_BACKEND_IGNORE);
rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_SEND);
@@ -450,7 +452,7 @@ void rrdset_delete_custom(RRDSET *st, int db_rotated) {
#ifdef ENABLE_ACLK
if ((netdata_cloud_setting) && (db_rotated || RRD_MEMORY_MODE_DBENGINE != st->rrd_memory_mode)) {
aclk_del_collector(st->rrdhost, st->plugin_name, st->module_name);
- aclk_update_chart(st->rrdhost, st->id, ACLK_CMD_CHARTDEL);
+ st->rrdhost->obsolete_count++;
}
#endif
@@ -858,6 +860,8 @@ RRDSET *rrdset_create_custom(
rrdset_flag_clear(st, RRDSET_FLAG_DETAIL);
rrdset_flag_clear(st, RRDSET_FLAG_DEBUG);
rrdset_flag_clear(st, RRDSET_FLAG_OBSOLETE);
+ rrdset_flag_clear(st, RRDSET_FLAG_EXPORTING_SEND);
+ rrdset_flag_clear(st, RRDSET_FLAG_EXPORTING_IGNORE);
rrdset_flag_clear(st, RRDSET_FLAG_BACKEND_SEND);
rrdset_flag_clear(st, RRDSET_FLAG_BACKEND_IGNORE);
rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_SEND);
@@ -928,7 +932,14 @@ RRDSET *rrdset_create_custom(
store_active_chart(st->chart_uuid);
+#ifdef ENABLE_ACLK
+ host->obsolete_count = 0;
+#endif
rrdhost_cleanup_obsolete_charts(host);
+#ifdef ENABLE_ACLK
+ if (host->obsolete_count)
+ aclk_update_chart(st->rrdhost, "dummy-chart", ACLK_CMD_CHARTDEL);
+#endif
rrdhost_unlock(host);
#ifdef ENABLE_ACLK