summaryrefslogtreecommitdiffstats
path: root/database/rrdset.c
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2022-11-22 22:42:16 +0200
committerGitHub <noreply@github.com>2022-11-22 22:42:16 +0200
commit4e61a4244e2ab45c29de0ddd84bfec8d9339f388 (patch)
tree4882db8ee7bd9de3251960320c7f553edc52b6c9 /database/rrdset.c
parent77a304f52e4c6aadef0eac06b4869b7e1c829175 (diff)
Replication fixes #3 (#14035)
* cleanup and additional information about replication * fix deadlock on sender mutex * do not ignore start streaming empty requests; when there duplicate requests, merge them * flipped the flag * final touch * added queued flag on the charts to prevent them from being obsoleted by the service thread
Diffstat (limited to 'database/rrdset.c')
-rw-r--r--database/rrdset.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/database/rrdset.c b/database/rrdset.c
index fcfba94273..ed9d547891 100644
--- a/database/rrdset.c
+++ b/database/rrdset.c
@@ -135,10 +135,11 @@ static void rrdset_insert_callback(const DICTIONARY_ITEM *item __maybe_unused, v
st->gap_when_lost_iterations_above = (int) (gap_when_lost_iterations_above + 2);
st->rrdhost = host;
- st->flags = RRDSET_FLAG_SYNC_CLOCK | RRDSET_FLAG_INDEXED_ID;
-
- if(host == localhost || !host->receiver || !stream_has_capability(host->receiver, STREAM_CAP_REPLICATION))
- st->flags |= RRDSET_FLAG_RECEIVER_REPLICATION_FINISHED;
+ st->flags = RRDSET_FLAG_SYNC_CLOCK
+ | RRDSET_FLAG_INDEXED_ID
+ | RRDSET_FLAG_RECEIVER_REPLICATION_FINISHED
+ | RRDSET_FLAG_SENDER_REPLICATION_FINISHED
+ ;
netdata_rwlock_init(&st->alerts.rwlock);