Check on parents the microseconds delta sent by agents (#14422)

check streaming BEGIN microseconds for negative values
This commit is contained in:
Costa Tsaousis 2023-02-03 21:40:19 +02:00 committed by GitHub
parent 3c73da09c3
commit bd7c9ebcc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -148,8 +148,11 @@ PARSER_RC pluginsd_begin(char **words, size_t num_words, void *user)
((PARSER_USER_OBJECT *)user)->st = st;
usec_t microseconds = 0;
if (microseconds_txt && *microseconds_txt)
microseconds = str2ull(microseconds_txt);
if (microseconds_txt && *microseconds_txt) {
long long t = str2ll(microseconds_txt, NULL);
if(t >= 0)
microseconds = t;
}
#ifdef NETDATA_LOG_REPLICATION_REQUESTS
if(st->replay.log_next_data_collection) {