diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2022-11-02 20:23:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 20:23:35 +0200 |
commit | 04ecb72856e0559459bb468c40ad87d5779d9ec9 (patch) | |
tree | 73b5ccef83f173b6e7de0251dc14211a3cd5749e /streaming/replication.c | |
parent | 2690887b4ecc7d43c9d992fb3910e3fa9361ece8 (diff) |
fix chart definition end time_t printing and parsing (#13942)
* fix chart definition end time_t printing and parsing
* properly check parameters to chart definition end
Diffstat (limited to 'streaming/replication.c')
-rw-r--r-- | streaming/replication.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/streaming/replication.c b/streaming/replication.c index ebfd79031f..d88649c55d 100644 --- a/streaming/replication.c +++ b/streaming/replication.c @@ -170,6 +170,13 @@ bool replicate_chart_response(RRDHOST *host, RRDSET *st, bool start_streaming, t // find the latest entry we have time_t last_entry_local = st->last_updated.tv_sec; + if(!last_entry_local) { + internal_error(true, + "RRDSET: '%s' last updated time zero. Querying db for last updated time.", + rrdset_id(st)); + last_entry_local = rrdset_last_entry_t(st); + } + if(last_entry_local > now) { internal_error(true, "RRDSET: '%s' last updated time %llu is in the future (now is %llu)", |