mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:04:13 +08:00
mdbx: don't log empty file read error upon creation it.
Change-Id: I9cb9f9bee23817331f91ffd0847c599cf1dc0a25
This commit is contained in:
parent
4d49112a56
commit
315e58578d
@ -5678,8 +5678,13 @@ static int __cold mdbx_read_header(MDBX_env *env, MDBX_meta *meta,
|
|||||||
meta_number, offset, (unsigned)sizeof(page), retryleft);
|
meta_number, offset, (unsigned)sizeof(page), retryleft);
|
||||||
int err = mdbx_pread(env->me_fd, &page, sizeof(page), offset);
|
int err = mdbx_pread(env->me_fd, &page, sizeof(page), offset);
|
||||||
if (err != MDBX_SUCCESS) {
|
if (err != MDBX_SUCCESS) {
|
||||||
mdbx_error("read meta[%u,%u]: %i, %s", offset, (unsigned)sizeof(page),
|
if (err == MDBX_ENODATA && offset == 0 && loop_count == 0 &&
|
||||||
err, mdbx_strerror(err));
|
*filesize == 0 && (env->me_flags & MDBX_RDONLY) == 0)
|
||||||
|
mdbx_notice("read meta: empty file (%d, %s)", err,
|
||||||
|
mdbx_strerror(err));
|
||||||
|
else
|
||||||
|
mdbx_error("read meta[%u,%u]: %i, %s", offset, (unsigned)sizeof(page),
|
||||||
|
err, mdbx_strerror(err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user