From 2e874e79163771856e4e756b176b729f7d8b0f0f Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Fri, 25 Nov 2022 20:37:15 +0200 Subject: replication fixes #6 (#14046) use the faster monotonic clock in workers and replication; avoid unecessary statistics function on every request on replication - gather them all together once every second; check the chart flags on all mirrored hosts, not only the ones that have a sender; cleanup and unify replication logs; added child world time to REND; fix first BEGIN been transmitted when replication starts; --- database/rrd.h | 2 ++ database/sqlite/sqlite_metadata.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'database') diff --git a/database/rrd.h b/database/rrd.h index 12bfb8660e..187c9a5fca 100644 --- a/database/rrd.h +++ b/database/rrd.h @@ -673,6 +673,7 @@ struct rrdset { #ifdef NETDATA_LOG_REPLICATION_REQUESTS struct { + bool log_next_data_collection; bool start_streaming; time_t after; time_t before; @@ -1078,6 +1079,7 @@ extern RRDHOST *localhost; #define rrdhost_sender_replicating_charts_minus_one(host) (__atomic_sub_fetch(&((host)->rrdpush_sender_replicating_charts), 1, __ATOMIC_RELAXED)) #define rrdhost_sender_replicating_charts_zero(host) (__atomic_store_n(&((host)->rrdpush_sender_replicating_charts), 0, __ATOMIC_RELAXED)) +extern DICTIONARY *rrdhost_root_index; long rrdhost_hosts_available(void); // ---------------------------------------------------------------------------- diff --git a/database/sqlite/sqlite_metadata.c b/database/sqlite/sqlite_metadata.c index d85bc55a3e..4eb212152b 100644 --- a/database/sqlite/sqlite_metadata.c +++ b/database/sqlite/sqlite_metadata.c @@ -2,8 +2,6 @@ #include "sqlite_metadata.h" -extern DICTIONARY *rrdhost_root_index; - // SQL statements #define SQL_STORE_CLAIM_ID "insert into node_instance " \ -- cgit v1.2.3