From dfea68270aa6354ee0028fe9a414421d1e163643 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Thu, 19 Jul 2018 08:48:50 +0300 Subject: [PATCH] mdbx: fix assertion inside mdbx_suspend_threads_before_remap(). Change-Id: If01fc5f655922c55b3955f2b00c93b80328c5232 --- src/lck-windows.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lck-windows.c b/src/lck-windows.c index ab3fae57..327979e6 100644 --- a/src/lck-windows.c +++ b/src/lck-windows.c @@ -253,7 +253,8 @@ int mdbx_suspend_threads_before_remap(MDBX_env *env, } else { /* Without LCK (i.e. read-only mode). * Walk thougth a snapshot of all running threads */ - mdbx_assert(env, env->me_txn0 == NULL); + mdbx_assert(env, + env->me_txn0 == NULL || (env->me_flags & MDBX_EXCLUSIVE) != 0); const HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0); if (hSnapshot == INVALID_HANDLE_VALUE) return GetLastError();