diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-14 18:12:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-14 18:12:14 +0000 |
commit | bb50acdcb8073654ea667b8c0272e335bd43f844 (patch) | |
tree | 1e00c8a29871426f8182658928dcb62e42d57ce8 /database/engine | |
parent | Releasing debian version 1.33.1-1. (diff) | |
download | netdata-bb50acdcb8073654ea667b8c0272e335bd43f844.tar.xz netdata-bb50acdcb8073654ea667b8c0272e335bd43f844.zip |
Merging upstream version 1.34.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'database/engine')
-rw-r--r-- | database/engine/README.md | 2 | ||||
-rw-r--r-- | database/engine/datafile.c | 1 | ||||
-rw-r--r-- | database/engine/journalfile.c | 3 |
3 files changed, 4 insertions, 2 deletions
diff --git a/database/engine/README.md b/database/engine/README.md index a782716f0..7defcce9d 100644 --- a/database/engine/README.md +++ b/database/engine/README.md @@ -256,4 +256,4 @@ and generate a read load of 1.7M/sec, whereas in the CPU-bound scenario the read Consequently, there is a significant degree of interference by the reader threads, that slow down the writer threads. This is also possible because the interference effects are greater than the SSD impact on data generation throughput. -[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fdatabase%2Fengine%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>) + diff --git a/database/engine/datafile.c b/database/engine/datafile.c index d42311079..46d7a8f10 100644 --- a/database/engine/datafile.c +++ b/database/engine/datafile.c @@ -159,6 +159,7 @@ int create_data_file(struct rrdengine_datafile *datafile) if (unlikely(ret)) { fatal("posix_memalign:%s", strerror(ret)); } + memset(superblock, 0, sizeof(*superblock)); (void) strncpy(superblock->magic_number, RRDENG_DF_MAGIC, RRDENG_MAGIC_SZ); (void) strncpy(superblock->version, RRDENG_DF_VER, RRDENG_VER_SZ); superblock->tier = 1; diff --git a/database/engine/journalfile.c b/database/engine/journalfile.c index 640656161..1541eb10a 100644 --- a/database/engine/journalfile.c +++ b/database/engine/journalfile.c @@ -210,6 +210,7 @@ int create_journal_file(struct rrdengine_journalfile *journalfile, struct rrdeng if (unlikely(ret)) { fatal("posix_memalign:%s", strerror(ret)); } + memset(superblock, 0, sizeof(*superblock)); (void) strncpy(superblock->magic_number, RRDENG_JF_MAGIC, RRDENG_MAGIC_SZ); (void) strncpy(superblock->version, RRDENG_JF_VER, RRDENG_VER_SZ); @@ -428,7 +429,7 @@ 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) { - error("uv_fs_read: pos=%lu, %s", pos, uv_strerror(ret)); + error("uv_fs_read: pos=%"PRIu64", %s", pos, uv_strerror(ret)); uv_fs_req_cleanup(&req); goto skip_file; } |