diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-07 11:49:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-07 12:42:05 +0000 |
commit | 2e85f9325a797977eea9dfea0a925775ddd211d9 (patch) | |
tree | 452c7f30d62fca5755f659b99e4e53c7b03afc21 /database/engine/rrdengineapi.h | |
parent | Releasing debian version 1.19.0-4. (diff) | |
download | netdata-2e85f9325a797977eea9dfea0a925775ddd211d9.tar.xz netdata-2e85f9325a797977eea9dfea0a925775ddd211d9.zip |
Merging upstream version 1.29.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'database/engine/rrdengineapi.h')
-rw-r--r-- | database/engine/rrdengineapi.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/database/engine/rrdengineapi.h b/database/engine/rrdengineapi.h index 1ef0569d..41375b98 100644 --- a/database/engine/rrdengineapi.h +++ b/database/engine/rrdengineapi.h @@ -6,14 +6,17 @@ #include "rrdengine.h" #define RRDENG_MIN_PAGE_CACHE_SIZE_MB (8) -#define RRDENG_MIN_DISK_SPACE_MB (256) +#define RRDENG_MIN_DISK_SPACE_MB (64) -#define RRDENG_NR_STATS (35) +#define RRDENG_NR_STATS (37) #define RRDENG_FD_BUDGET_PER_INSTANCE (50) extern int default_rrdeng_page_cache_mb; extern int default_rrdeng_disk_quota_mb; +extern int default_multidb_disk_quota_mb; +extern uint8_t rrdeng_drop_metrics_under_page_cache_pressure; +extern struct rrdengine_instance multidb_ctx; struct rrdeng_region_info { time_t start_time; @@ -27,13 +30,20 @@ extern void rrdeng_commit_page(struct rrdengine_instance *ctx, struct rrdeng_pag extern void *rrdeng_get_latest_page(struct rrdengine_instance *ctx, uuid_t *id, void **handle); extern void *rrdeng_get_page(struct rrdengine_instance *ctx, uuid_t *id, usec_t point_in_time, void **handle); extern void rrdeng_put_page(struct rrdengine_instance *ctx, void *handle); + +extern void rrdeng_generate_legacy_uuid(const char *dim_id, char *chart_id, uuid_t *ret_uuid); +extern void rrdeng_convert_legacy_uuid_to_multihost(char machine_guid[GUID_LEN + 1], uuid_t *legacy_uuid, + uuid_t *ret_uuid); + + +extern void rrdeng_metric_init(RRDDIM *rd, uuid_t *dim_uuid); extern void rrdeng_store_metric_init(RRDDIM *rd); extern void rrdeng_store_metric_flush_current_page(RRDDIM *rd); extern void rrdeng_store_metric_next(RRDDIM *rd, usec_t point_in_time, storage_number number); -extern void rrdeng_store_metric_finalize(RRDDIM *rd); +extern int rrdeng_store_metric_finalize(RRDDIM *rd); extern unsigned rrdeng_variable_step_boundaries(RRDSET *st, time_t start_time, time_t end_time, - struct rrdeng_region_info **region_info_arrayp, unsigned *max_intervalp); + struct rrdeng_region_info **region_info_arrayp, unsigned *max_intervalp, struct context_param *context_param_list); extern void rrdeng_load_metric_init(RRDDIM *rd, struct rrddim_query_handle *rrdimm_handle, time_t start_time, time_t end_time); extern storage_number rrdeng_load_metric_next(struct rrddim_query_handle *rrdimm_handle, time_t *current_time); @@ -41,12 +51,13 @@ extern int rrdeng_load_metric_is_finished(struct rrddim_query_handle *rrdimm_han extern void rrdeng_load_metric_finalize(struct rrddim_query_handle *rrdimm_handle); extern time_t rrdeng_metric_latest_time(RRDDIM *rd); extern time_t rrdeng_metric_oldest_time(RRDDIM *rd); -extern void rrdeng_get_35_statistics(struct rrdengine_instance *ctx, unsigned long long *array); +extern void rrdeng_get_37_statistics(struct rrdengine_instance *ctx, unsigned long long *array); /* must call once before using anything */ -extern int rrdeng_init(struct rrdengine_instance **ctxp, char *dbfiles_path, unsigned page_cache_mb, +extern int rrdeng_init(RRDHOST *host, struct rrdengine_instance **ctxp, char *dbfiles_path, unsigned page_cache_mb, unsigned disk_space_mb); extern int rrdeng_exit(struct rrdengine_instance *ctx); +extern void rrdeng_prepare_exit(struct rrdengine_instance *ctx); -#endif /* NETDATA_RRDENGINEAPI_H */
\ No newline at end of file +#endif /* NETDATA_RRDENGINEAPI_H */ |