diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-12-01 06:15:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-12-01 06:15:11 +0000 |
commit | 483926a283e118590da3f9ecfa75a8a4d62143ce (patch) | |
tree | cb77052778df9a128a8cd3ff5bf7645322a13bc5 /database/engine/journalfile.c | |
parent | Releasing debian version 1.31.0-4. (diff) | |
download | netdata-483926a283e118590da3f9ecfa75a8a4d62143ce.tar.xz netdata-483926a283e118590da3f9ecfa75a8a4d62143ce.zip |
Merging upstream version 1.32.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | database/engine/journalfile.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/database/engine/journalfile.c b/database/engine/journalfile.c index 9fecc48ff..640656161 100644 --- a/database/engine/journalfile.c +++ b/database/engine/journalfile.c @@ -94,7 +94,7 @@ void * wal_get_transaction_buffer(struct rrdengine_worker_config* wc, unsigned s void generate_journalfilepath(struct rrdengine_datafile *datafile, char *str, size_t maxlen) { - (void) snprintf(str, maxlen, "%s/" WALFILE_PREFIX RRDENG_FILE_NUMBER_PRINT_TMPL WALFILE_EXTENSION, + (void) snprintfz(str, maxlen, "%s/" WALFILE_PREFIX RRDENG_FILE_NUMBER_PRINT_TMPL WALFILE_EXTENSION, datafile->ctx->dbfiles_path, datafile->tier, datafile->fileno); } @@ -428,8 +428,9 @@ static uint64_t iterate_transactions(struct rrdengine_instance *ctx, struct rrde iov = uv_buf_init(buf, size_bytes); ret = uv_fs_read(NULL, &req, file, &iov, 1, pos, NULL); if (ret < 0) { - fatal("uv_fs_read: %s", uv_strerror(ret)); - /*uv_fs_req_cleanup(&req);*/ + error("uv_fs_read: pos=%lu, %s", pos, uv_strerror(ret)); + uv_fs_req_cleanup(&req); + goto skip_file; } fatal_assert(req.result >= 0); uv_fs_req_cleanup(&req); @@ -451,7 +452,7 @@ static uint64_t iterate_transactions(struct rrdengine_instance *ctx, struct rrde max_id = MAX(max_id, id); } } - +skip_file: free(buf); return max_id; } @@ -512,4 +513,4 @@ void init_commit_log(struct rrdengine_instance *ctx) ctx->commit_log.buf = NULL; ctx->commit_log.buf_pos = 0; ctx->commit_log.transaction_id = 1; -}
\ No newline at end of file +} |