From 7232d7b5fcba92c91b28d9e85c9f9bf721d3ba36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Wed, 23 Oct 2024 13:22:53 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D1=83=D1=82=D0=BE=D1=87=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20`mdbx=5Fdbi=5Fclose()`=20=D0=B4=D0=BB=D1=8F=20=D1=81?= =?UTF-8?q?=D0=BB=D1=83=D1=87=D0=B0=D1=8F=20=D1=85=D0=B5=D0=BD=D0=B4=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D1=85=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B8=D1=86.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mdbx.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mdbx.h b/mdbx.h index e3915991..4f7d11dd 100644 --- a/mdbx.h +++ b/mdbx.h @@ -2013,7 +2013,7 @@ typedef enum MDBX_error { MDBX_DUPLICATED_CLK = -30413, /** Some cursors and/or other resources should be closed before table or - * corresponding DBI-handle could be (re)used */ + * corresponding DBI-handle could be (re)used and/or closed. */ MDBX_DANGLING_DBI = -30412, /** The parked read transaction was outed for the sake of @@ -4904,9 +4904,12 @@ LIBMDBX_INLINE_API(int, mdbx_dbi_flags, * \ref mdbx_env_set_maxdbs(), unless that value would be large. * * \note Use with care. - * This call is synchronized via mutex with \ref mdbx_dbi_close(), but NOT with - * other transactions running by other threads. The "next" version of libmdbx - * (\ref MithrilDB) will solve this issue. + * This call is synchronized via mutex with \ref mdbx_dbi_open(), but NOT with + * any transaction(s) running by other thread(s). + * So the `mdbx_dbi_close()` MUST NOT be called in-parallel/concurrently + * with any transactions using the closing dbi-handle, nor during other thread + * commit/abort a write transacton(s). The "next" version of libmdbx (\ref + * MithrilDB) will solve this issue. * * Handles should only be closed if no other threads are going to reference * the table handle or one of its cursors any further. Do not close a handle