diff options
Diffstat (limited to 'database/rrd.h')
-rw-r--r-- | database/rrd.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/database/rrd.h b/database/rrd.h index 0069715b90..b548aa7169 100644 --- a/database/rrd.h +++ b/database/rrd.h @@ -55,6 +55,7 @@ struct pg_cache_page_index; #include "sqlite/sqlite_health.h" #include "rrdcontext.h" +extern bool unittest_running; extern bool dbengine_enabled; extern size_t storage_tiers; extern size_t storage_tiers_grouping_iterations[RRD_STORAGE_TIERS]; @@ -533,8 +534,9 @@ typedef enum rrdset_flags { RRDSET_FLAG_SENDER_REPLICATION_FINISHED = (1 << 22), // the sending side has completed replication RRDSET_FLAG_RECEIVER_REPLICATION_FINISHED = (1 << 23), // the receiving side has completed replication + RRDSET_FLAG_RECEIVER_REPLICATION_IN_PROGRESS = (1 << 24), // the receiving side has replication in progress - RRDSET_FLAG_UPSTREAM_SEND_VARIABLES = (1 << 24), // a custom variable has been updated and needs to be exposed to parent + RRDSET_FLAG_UPSTREAM_SEND_VARIABLES = (1 << 25), // a custom variable has been updated and needs to be exposed to parent } RRDSET_FLAGS; #define rrdset_flag_check(st, flag) (__atomic_load_n(&((st)->flags), __ATOMIC_SEQ_CST) & (flag)) @@ -658,6 +660,14 @@ struct rrdset { netdata_rwlock_t rwlock; // protection for RRDCALC *base RRDCALC *base; // double linked list of RRDCALC related to this RRDSET } alerts; + +#ifdef NETDATA_INTERNAL_CHECKS + struct { + bool start_streaming; + time_t after; + time_t before; + } replay; +#endif }; #define rrdset_plugin_name(st) string2str((st)->plugin_name) @@ -757,6 +767,8 @@ typedef enum { // Configuration options RRDHOST_OPTION_DELETE_OBSOLETE_CHARTS = (1 << 3), // delete files of obsolete charts RRDHOST_OPTION_DELETE_ORPHAN_HOST = (1 << 4), // delete the entire host when orphan + + RRDHOST_OPTION_REPLICATION = (1 << 5), // when set, we support replication for this host } RRDHOST_OPTIONS; #define rrdhost_option_check(host, flag) ((host)->options & (flag)) @@ -937,7 +949,6 @@ struct rrdhost { struct rrdpush_destinations *destination; // the current destination from the above list SIMPLE_PATTERN *rrdpush_send_charts_matching; // pattern to match the charts to be sent - bool rrdpush_enable_replication; // enable replication time_t rrdpush_seconds_to_replicate; // max time we want to replicate from the child time_t rrdpush_replication_step; // seconds per replication step |