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 /collectors | |
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 'collectors')
-rw-r--r-- | collectors/plugins.d/pluginsd_parser.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/collectors/plugins.d/pluginsd_parser.c b/collectors/plugins.d/pluginsd_parser.c index 732120c316..1ddc249db9 100644 --- a/collectors/plugins.d/pluginsd_parser.c +++ b/collectors/plugins.d/pluginsd_parser.c @@ -287,6 +287,12 @@ PARSER_RC pluginsd_chart_definition_end(char **words, size_t num_words, void *us "REPLAY: received " PLUGINSD_KEYWORD_CHART_DEFINITION_END " with malformed timings (first time %llu, last time %llu).", (unsigned long long)first_entry_child, (unsigned long long)last_entry_child); +// internal_error( +// true, +// "REPLAY host '%s', chart '%s': received " PLUGINSD_KEYWORD_CHART_DEFINITION_END " first time %llu, last time %llu.", +// rrdhost_hostname(host), rrdset_id(st), +// (unsigned long long)first_entry_child, (unsigned long long)last_entry_child); + rrdset_flag_clear(st, RRDSET_FLAG_RECEIVER_REPLICATION_FINISHED); bool ok = replicate_chart_request(send_to_plugin, user_object->parser, host, st, first_entry_child, last_entry_child, 0, 0); @@ -1098,12 +1104,12 @@ PARSER_RC pluginsd_replay_end(char **words, size_t num_words, void *user) } time_t update_every_child = str2l(get_word(words, num_words, 1)); - time_t first_entry_child = str2l(get_word(words, num_words, 2)); - time_t last_entry_child = str2l(get_word(words, num_words, 3)); + time_t first_entry_child = (time_t)str2ull(get_word(words, num_words, 2)); + time_t last_entry_child = (time_t)str2ull(get_word(words, num_words, 3)); bool start_streaming = (strcmp(get_word(words, num_words, 4), "true") == 0); - time_t first_entry_requested = str2l(get_word(words, num_words, 5)); - time_t last_entry_requested = str2l(get_word(words, num_words, 6)); + time_t first_entry_requested = (time_t)str2ull(get_word(words, num_words, 5)); + time_t last_entry_requested = (time_t)str2ull(get_word(words, num_words, 6)); PARSER_USER_OBJECT *user_object = user; @@ -1116,6 +1122,13 @@ PARSER_RC pluginsd_replay_end(char **words, size_t num_words, void *user) return PARSER_RC_ERROR; } +// internal_error(true, +// "REPLAY: host '%s', chart '%s': received " PLUGINSD_KEYWORD_REPLAY_END " child first_t = %llu, last_t = %llu, start_streaming = %s, requested first_t = %llu, last_t = %llu", +// rrdhost_hostname(host), rrdset_id(st), +// (unsigned long long)first_entry_child, (unsigned long long)last_entry_child, +// start_streaming?"true":"false", +// (unsigned long long)first_entry_requested, (unsigned long long)last_entry_requested); + ((PARSER_USER_OBJECT *) user)->st = NULL; ((PARSER_USER_OBJECT *) user)->count++; |