diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-08-17 10:46:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-08-17 10:46:12 +0000 |
commit | 51dfb248933e5fac12fee1be8471bb08f9554428 (patch) | |
tree | 1d25518313ca94af4257e56ef919605a219a4178 /database/engine | |
parent | Adding upstream version 1.42.0. (diff) | |
download | netdata-51dfb248933e5fac12fee1be8471bb08f9554428.tar.xz netdata-51dfb248933e5fac12fee1be8471bb08f9554428.zip |
Adding upstream version 1.42.1.upstream/1.42.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | database/engine/rrdengineapi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/database/engine/rrdengineapi.c b/database/engine/rrdengineapi.c index 264cbdfeb..c6b1fa2dd 100755 --- a/database/engine/rrdengineapi.c +++ b/database/engine/rrdengineapi.c @@ -1014,7 +1014,12 @@ size_t rrdeng_disk_space_used(STORAGE_INSTANCE *db_instance) { time_t rrdeng_global_first_time_s(STORAGE_INSTANCE *db_instance) { struct rrdengine_instance *ctx = (struct rrdengine_instance *)db_instance; - return __atomic_load_n(&ctx->atomic.first_time_s, __ATOMIC_RELAXED); + + time_t t = __atomic_load_n(&ctx->atomic.first_time_s, __ATOMIC_RELAXED); + if(t == LONG_MAX || t < 0) + t = 0; + + return t; } size_t rrdeng_currently_collected_metrics(STORAGE_INSTANCE *db_instance) { |