From 82f053a68557462311f54baf95fbcc1df5234e30 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Thu, 27 Apr 2017 18:14:19 +0300 Subject: [PATCH] mdbx: more debug for lck-seize. --- src/mdbx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mdbx.c b/src/mdbx.c index c3dcfb30..48595b13 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -3834,6 +3834,9 @@ static int __cold mdbx_setup_lck(MDB_env *env, char *lck_pathname, int mode) { if (MDBX_IS_ERROR(rc)) return rc; + mdbx_debug("lck-setup: %s ", + (rc == MDBX_RESULT_TRUE) ? "exclusive" : "shared"); + err = mdbx_filesize(env->me_lfd, &size); if (unlikely(err != MDB_SUCCESS)) return err; @@ -4019,6 +4022,7 @@ int __cold mdbx_env_open_ex(MDB_env *env, const char *path, unsigned flags, /* LY: downgrade lock only if exclusive access not requested. * in case exclusive==1, just leave value as is. */ rc = mdbx_lck_downgrade(env); + mdbx_debug("lck-downgrade: rc %i ", rc); if (rc != MDB_SUCCESS) goto bailout; }