diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2022-11-03 12:13:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-03 12:13:48 +0200 |
commit | a19795e85fd1d026171661c7f97bde8f9f7d0b1a (patch) | |
tree | 080a060e19fcb3a248514cff01e5749b8fad895c /streaming/sender.c | |
parent | cd28c686158840afb020d6b984aa9f96ac656742 (diff) |
do not resend charts upstream when chart variables are being updated (#13946)
* do not resend charts upstream when chart variables are being updated
* re-stream archived hosts that are now being collected
Diffstat (limited to 'streaming/sender.c')
-rw-r--r-- | streaming/sender.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/streaming/sender.c b/streaming/sender.c index 20d57b7135..8579f81475 100644 --- a/streaming/sender.c +++ b/streaming/sender.c @@ -1254,11 +1254,8 @@ void *rrdpush_sender_thread(void *ptr) { rrdpush_claimed_id(s->host); rrdpush_send_host_labels(s->host); - // TO PUSH METRICS WITH DEFINITIONS: - //if(unlikely(s->rrdpush_sender_socket != -1 && __atomic_load_n(&s->host->rrdpush_sender_connected, __ATOMIC_SEQ_CST))) { - // thread_data->sending_definitions_status = SENDING_DEFINITIONS_DONE; - // rrdhost_flag_set(s->host, RRDHOST_FLAG_STREAM_COLLECTED_METRICS); - //} + rrdhost_flag_set(s->host, RRDHOST_FLAG_RRDPUSH_SENDER_READY_4_METRICS); + info("STREAM %s [send to %s]: enabling metrics streaming...", rrdhost_hostname(s->host), s->connected_to); continue; } @@ -1280,14 +1277,6 @@ void *rrdpush_sender_thread(void *ptr) { if(outstanding) s->send_attempts++; - else { - if(unlikely(rrdhost_flag_check(s->host, RRDHOST_FLAG_RRDPUSH_SENDER_CONNECTED) && - !rrdhost_flag_check(s->host, RRDHOST_FLAG_RRDPUSH_SENDER_READY_4_METRICS))) { - // let the data collection threads know we are ready to push metrics - rrdhost_flag_set(s->host, RRDHOST_FLAG_RRDPUSH_SENDER_READY_4_METRICS); - info("STREAM %s [send to %s]: enabling metrics streaming...", rrdhost_hostname(s->host), s->connected_to); - } - } if(unlikely(s->rrdpush_sender_pipe[PIPE_READ] == -1)) { if(!rrdpush_sender_pipe_close(s->host, s->rrdpush_sender_pipe, true)) { |