mirror of
https://github.com/isar/libmdbx.git
synced 2026-01-22 05:42:21 +08:00
mdbx: windows - fix truncation race while unmap.
Change-Id: I93983d100c78aa3e57c5a7ebd9d5bf2a96081ed7
This commit is contained in:
@@ -2041,6 +2041,11 @@ static int mdbx_mapresize(MDBX_env *env, const pgno_t size_pgno,
|
||||
|
||||
bailout:
|
||||
if (rc == MDBX_SUCCESS) {
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
assert(size_bytes == env->me_dxb_mmap.current);
|
||||
assert(size_bytes <= env->me_dxb_mmap.filesize);
|
||||
assert(limit_bytes == env->me_dxb_mmap.length);
|
||||
#endif
|
||||
env->me_dbgeo.now = size_bytes;
|
||||
env->me_dbgeo.upper = limit_bytes;
|
||||
if (env->me_txn) {
|
||||
|
||||
Reference in New Issue
Block a user