diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:19:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-03-09 13:19:22 +0000 |
commit | c21c3b0befeb46a51b6bf3758ffa30813bea0ff0 (patch) | |
tree | 9754ff1ca740f6346cf8483ec915d4054bc5da2d /registry/registry_db.c | |
parent | Adding upstream version 1.43.2. (diff) | |
download | netdata-c21c3b0befeb46a51b6bf3758ffa30813bea0ff0.tar.xz netdata-c21c3b0befeb46a51b6bf3758ffa30813bea0ff0.zip |
Adding upstream version 1.44.3.upstream/1.44.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'registry/registry_db.c')
-rw-r--r-- | registry/registry_db.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/registry/registry_db.c b/registry/registry_db.c index a5c3956a5..448ca29d3 100644 --- a/registry/registry_db.c +++ b/registry/registry_db.c @@ -112,7 +112,7 @@ int registry_db_save(void) { if(unlikely(!registry_db_should_be_saved())) return -2; - error_log_limit_unlimited(); + nd_log_limits_unlimited(); char tmp_filename[FILENAME_MAX + 1]; char old_filename[FILENAME_MAX + 1]; @@ -124,7 +124,7 @@ int registry_db_save(void) { FILE *fp = fopen(tmp_filename, "w"); if(!fp) { netdata_log_error("REGISTRY: Cannot create file: %s", tmp_filename); - error_log_limit_reset(); + nd_log_limits_reset(); return -1; } @@ -135,7 +135,7 @@ int registry_db_save(void) { if(bytes1 < 0) { netdata_log_error("REGISTRY: Cannot save registry machines - return value %d", bytes1); fclose(fp); - error_log_limit_reset(); + nd_log_limits_reset(); return bytes1; } netdata_log_debug(D_REGISTRY, "REGISTRY: saving machines took %d bytes", bytes1); @@ -145,7 +145,7 @@ int registry_db_save(void) { if(bytes2 < 0) { netdata_log_error("REGISTRY: Cannot save registry persons - return value %d", bytes2); fclose(fp); - error_log_limit_reset(); + nd_log_limits_reset(); return bytes2; } netdata_log_debug(D_REGISTRY, "REGISTRY: saving persons took %d bytes", bytes2); @@ -204,7 +204,7 @@ int registry_db_save(void) { } // continue operations - error_log_limit_reset(); + nd_log_limits_reset(); return -1; } @@ -222,7 +222,8 @@ size_t registry_db_load(void) { netdata_log_debug(D_REGISTRY, "REGISTRY: loading active db from: '%s'", registry.db_filename); FILE *fp = fopen(registry.db_filename, "r"); if(!fp) { - netdata_log_error("REGISTRY: cannot open registry file: '%s'", registry.db_filename); + if (errno != ENOENT) + netdata_log_error("REGISTRY: cannot open registry file: '%s'", registry.db_filename); return 0; } |