diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2022-10-13 08:05:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-13 08:05:15 +0300 |
commit | afe1b704857a7307547341a1027c019bbe68e910 (patch) | |
tree | 9fc032a6861c540ad875ca364da94d71d861326d /database/rrddim.c | |
parent | 2974f525ec703329ef6ad079d8f6c685cfab11ad (diff) |
dbengine free from RRDSET and RRDDIM (#13772)
* dbengine free from RRDSET and RRDDIM
* fix for excess parameters to query ops
* add comment about ML
* update_every from int to uint32_t
* rrddim_mem storage engine working
* fixes for update_every_s
* working dbengine
* a lot of changes in dbengine regarding timestamps
* better logging of not sequential points
* rrdset_done() now gives aligned timestamps for higher tiers
* dont change the end_time of descriptors, because they cant be loaded back
* fixes for cmake
* fixes for db mode ram
* Global counters for dbengine loading errors.
Ensure dbengine store metrics always has aligned metrics or breaks the page when storing new data.
* update lgtm config
* fixes for 32-bit systems
* update unittests
* Don't try to find and create a host on the fly if not already in memory
* Remove unused functions
* print backtrace in case of fatal
* always set ctx to page_index
* detect ctx and metric uuid discrepancies
* use legacy uuid if multihost is not available
* fix for last commit
* prevent repeating log
* Do not try to access archived charts when executing a data query
* Remove unused function
* log inconsistent collections once every 10 mins
Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com>
Diffstat (limited to 'database/rrddim.c')
-rw-r--r-- | database/rrddim.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/database/rrddim.c b/database/rrddim.c index 59ef31eed0..d47864fc5a 100644 --- a/database/rrddim.c +++ b/database/rrddim.c @@ -101,7 +101,7 @@ static void rrddim_insert_callback(const DICTIONARY_ITEM *item __maybe_unused, v rd->tiers[tier]->mode = eng->id; rd->tiers[tier]->collect_ops = eng->api.collect_ops; rd->tiers[tier]->query_ops = eng->api.query_ops; - rd->tiers[tier]->db_metric_handle = eng->api.init(rd, host->storage_instance[tier]); + rd->tiers[tier]->db_metric_handle = eng->api.metric_get_or_create(rd, host->storage_instance[tier], rd->rrdset->storage_metrics_groups[tier]); storage_point_unset(rd->tiers[tier]->virtual_point); initialized++; @@ -120,7 +120,7 @@ static void rrddim_insert_callback(const DICTIONARY_ITEM *item __maybe_unused, v size_t initialized = 0; for (int tier = 0; tier < storage_tiers; tier++) { if (rd->tiers[tier]) { - rd->tiers[tier]->db_collection_handle = rd->tiers[tier]->collect_ops.init(rd->tiers[tier]->db_metric_handle); + rd->tiers[tier]->db_collection_handle = rd->tiers[tier]->collect_ops.init(rd->tiers[tier]->db_metric_handle, st->update_every * storage_tiers_grouping_iterations[tier]); initialized++; } } @@ -217,7 +217,7 @@ static void rrddim_delete_callback(const DICTIONARY_ITEM *item __maybe_unused, v STORAGE_ENGINE* eng = storage_engine_get(rd->tiers[tier]->mode); if(eng) - eng->api.free(rd->tiers[tier]->db_metric_handle); + eng->api.metric_release(rd->tiers[tier]->db_metric_handle); freez(rd->tiers[tier]); rd->tiers[tier] = NULL; @@ -253,7 +253,7 @@ static bool rrddim_conflict_callback(const DICTIONARY_ITEM *item __maybe_unused, for(int tier = 0; tier < storage_tiers ;tier++) { if (rd->tiers[tier]) rd->tiers[tier]->db_collection_handle = - rd->tiers[tier]->collect_ops.init(rd->tiers[tier]->db_metric_handle); + rd->tiers[tier]->collect_ops.init(rd->tiers[tier]->db_metric_handle, st->update_every * storage_tiers_grouping_iterations[tier]); } rrddim_flag_clear(rd, RRDDIM_FLAG_ARCHIVED); |