summaryrefslogtreecommitdiffstats
path: root/database/engine/rrdengine.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:08 +0000
commit81581f9719bc56f01d5aa08952671d65fda9867a (patch)
tree0f5c6b6138bf169c23c9d24b1fc0a3521385cb18 /database/engine/rrdengine.h
parentReleasing debian version 1.38.1-1. (diff)
downloadnetdata-81581f9719bc56f01d5aa08952671d65fda9867a.tar.xz
netdata-81581f9719bc56f01d5aa08952671d65fda9867a.zip
Merging upstream version 1.39.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'database/engine/rrdengine.h')
-rw-r--r--database/engine/rrdengine.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/database/engine/rrdengine.h b/database/engine/rrdengine.h
index 492666815..69e412354 100644
--- a/database/engine/rrdengine.h
+++ b/database/engine/rrdengine.h
@@ -160,9 +160,7 @@ struct jv2_page_info {
};
typedef enum __attribute__ ((__packed__)) {
- RRDENG_CHO_UNALIGNED = (1 << 0), // set when this metric is not page aligned according to page alignment
- RRDENG_FIRST_PAGE_ALLOCATED = (1 << 1), // set when this metric has allocated its first page
- RRDENG_1ST_METRIC_WRITER = (1 << 2),
+ RRDENG_1ST_METRIC_WRITER = (1 << 0),
} RRDENG_COLLECT_HANDLE_OPTIONS;
typedef enum __attribute__ ((__packed__)) {
@@ -183,12 +181,17 @@ typedef enum __attribute__ ((__packed__)) {
} RRDENG_COLLECT_PAGE_FLAGS;
struct rrdeng_collect_handle {
+ struct storage_collect_handle common; // has to be first item
+
+ RRDENG_COLLECT_PAGE_FLAGS page_flags;
+ RRDENG_COLLECT_HANDLE_OPTIONS options;
+ uint8_t type;
+
struct metric *metric;
struct pgc_page *page;
+ void *data;
+ size_t data_size;
struct pg_alignment *alignment;
- RRDENG_COLLECT_HANDLE_OPTIONS options;
- uint8_t type;
- RRDENG_COLLECT_PAGE_FLAGS page_flags;
uint32_t page_entries_max;
uint32_t page_position; // keep track of the current page size, to make sure we don't exceed it
usec_t page_start_time_ut;
@@ -515,4 +518,8 @@ static inline time_t max_acceptable_collected_time(void) {
void datafile_delete(struct rrdengine_instance *ctx, struct rrdengine_datafile *datafile, bool update_retention, bool worker);
+static inline int journal_metric_uuid_compare(const void *key, const void *metric) {
+ return uuid_memcmp((uuid_t *)key, &(((struct journal_metric_list *) metric)->uuid));
+}
+
#endif /* NETDATA_RRDENGINE_H */