diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2021-06-01 12:44:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 12:44:34 +0300 |
commit | c851ea0adaab9c8f016bbe75e6b021d5ea147c17 (patch) | |
tree | fa32fd12334a940ad9c3fc726e641655691ffec1 /database/engine/journalfile.c | |
parent | 5de2432537ba4300c2c2160efdd017d828f23937 (diff) |
Ignore dbengine journal files that can not be read (#11210)
Diffstat (limited to 'database/engine/journalfile.c')
-rw-r--r-- | database/engine/journalfile.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/database/engine/journalfile.c b/database/engine/journalfile.c index 9fecc48ff8..e84f6a5af4 100644 --- a/database/engine/journalfile.c +++ b/database/engine/journalfile.c @@ -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; } |