mdbx: быстрая обработка режима MDBX_EXCLUSIVE для mdbx_env_resurrect_after_fork().

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2024-03-20 03:09:33 +03:00
parent 94a6bc140d
commit 236afee80b

View File

@ -15926,7 +15926,7 @@ __cold int mdbx_env_resurrect_after_fork(MDBX_env *env) {
int rc = env_close(env, true);
env->me_signature.weak = MDBX_ME_SIGNATURE;
if (likely(rc == MDBX_SUCCESS)) {
rc = env_open(env, 0);
rc = (env->me_flags & MDBX_EXCLUSIVE) ? MDBX_BUSY : env_open(env, 0);
if (unlikely(rc != MDBX_SUCCESS && env_close(env, false) != MDBX_SUCCESS)) {
rc = MDBX_PANIC;
env->me_flags |= MDBX_FATAL_ERROR;