diff options
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 a782716f..7defcce9 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 d4231107..46d7a8f1 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 64065616..1541eb10 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; } |