summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvkalintiris <vasilis@netdata.cloud>2024-11-06 17:07:37 +0200
committervkalintiris <vasilis@netdata.cloud>2024-11-12 09:47:25 +0200
commit28a2d0797e2405078be722797bb3d09970d1d261 (patch)
tree7728eb4c497db6f258ed4c2d8607b8466555299d
parent498406a699f640cbe09ef6c15d47461fa5181daf (diff)
default_backfillrrdeng_cfg
-rwxr-xr-xsrc/database/engine/rrdengineapi.c2
-rw-r--r--src/database/engine/rrdengineapi.h3
-rw-r--r--src/database/rrdhost.c2
-rw-r--r--src/web/api/queries/query.c4
4 files changed, 5 insertions, 6 deletions
diff --git a/src/database/engine/rrdengineapi.c b/src/database/engine/rrdengineapi.c
index 6c902ac4df..4357f41051 100755
--- a/src/database/engine/rrdengineapi.c
+++ b/src/database/engine/rrdengineapi.c
@@ -59,7 +59,6 @@ __attribute__((constructor)) void initialize_multidb_ctx(void) {
initialize_single_ctx(multidb_ctx[i]);
}
-RRD_BACKFILL default_backfill = RRD_BACKFILL_NEW;
rrdengine_config_t rrdeng_cfg = {
#if defined(ENV32BIT)
@@ -73,6 +72,7 @@ rrdengine_config_t rrdeng_cfg = {
.multidb_disk_quota_mb = RRDENG_DEFAULT_TIER_DISK_SPACE_MB,
.new_dbengine_defaults = false,
.legacy_multihost_db_space = false,
+ .backfill = RRD_BACKFILL_NEW,
};
// ----------------------------------------------------------------------------
diff --git a/src/database/engine/rrdengineapi.h b/src/database/engine/rrdengineapi.h
index 0cbd51bffa..5698d350b2 100644
--- a/src/database/engine/rrdengineapi.h
+++ b/src/database/engine/rrdengineapi.h
@@ -21,12 +21,11 @@ typedef struct rrdengine_config {
int multidb_disk_quota_mb;
bool new_dbengine_defaults;
bool legacy_multihost_db_space;
+ RRD_BACKFILL backfill;
} rrdengine_config_t;
extern rrdengine_config_t rrdeng_cfg;
-extern RRD_BACKFILL default_backfill;
-
extern struct rrdengine_instance *multidb_ctx[RRD_STORAGE_TIERS];
extern size_t page_type_size[];
extern size_t tier_page_size[];
diff --git a/src/database/rrdhost.c b/src/database/rrdhost.c
index 67b6e92dcb..8812ee0c51 100644
--- a/src/database/rrdhost.c
+++ b/src/database/rrdhost.c
@@ -905,7 +905,7 @@ static void dbengine_init(const char *hostname) {
!config_exists(CONFIG_SECTION_DB, "dbengine tier 3 retention size") &&
!config_exists(CONFIG_SECTION_DB, "dbengine tier 4 retention size"));
- default_backfill = get_dbengine_backfill(RRD_BACKFILL_NEW);
+ rrdeng_cfg.backfill = get_dbengine_backfill(RRD_BACKFILL_NEW);
char dbengineconfig[200 + 1];
size_t grouping_iterations = default_rrd_update_every;
diff --git a/src/web/api/queries/query.c b/src/web/api/queries/query.c
index 6854300f3d..237da6a8c8 100644
--- a/src/web/api/queries/query.c
+++ b/src/web/api/queries/query.c
@@ -1967,7 +1967,7 @@ void store_metric_at_tier(RRDDIM *rd, size_t tier, struct rrddim_tier *t, STORAG
void rrdr_fill_tier_gap_from_smaller_tiers(RRDDIM *rd, size_t tier, time_t now_s) {
if(unlikely(tier >= storage_tiers)) return;
#ifdef ENABLE_DBENGINE
- if(default_backfill == RRD_BACKFILL_NONE) return;
+ if(rrdeng_cfg.backfill == RRD_BACKFILL_NONE) return;
#else
return;
#endif
@@ -1981,7 +1981,7 @@ void rrdr_fill_tier_gap_from_smaller_tiers(RRDDIM *rd, size_t tier, time_t now_s
// if the user wants only NEW backfilling, and we don't have any data
#ifdef ENABLE_DBENGINE
- if(default_backfill == RRD_BACKFILL_NEW && latest_time_s <= 0) return;
+ if(rrdeng_cfg.backfill == RRD_BACKFILL_NEW && latest_time_s <= 0) return;
#else
return;
#endif