From f20addd7fc6c6fc7f14c539b652d93428b79f050 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: Sat, 13 Jul 2024 17:03:06 +0300 Subject: [PATCH] =?UTF-8?q?mdbx-doc:=20=D0=B4=D0=BE=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=82=D0=BA=D0=B0=20doxygen-=D1=81=D1=81=D1=8B=D0=BB?= =?UTF-8?q?=D0=BE=D0=BA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/_restrictions.md | 5 +++-- mdbx.h | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/_restrictions.md b/docs/_restrictions.md index 64c54de6..7e905b5e 100644 --- a/docs/_restrictions.md +++ b/docs/_restrictions.md @@ -35,11 +35,12 @@ or debugging of a client application while retaining an active read transaction. LMDB this results in `MDB_MAP_FULL` error and subsequent write performance degradation. -MDBX mostly solve "long-lived" readers issue by using the +MDBX mostly solve "long-lived" readers issue by offering to use a +transaction parking-and-ousting approach by \ref mdbx_txn_park(), Handle-Slow-Readers \ref MDBX_hsr_func callback which allows to abort long-lived read transactions, and using the \ref MDBX_LIFORECLAIM mode which addresses subsequent performance degradation. The "next" version -of libmdbx (\ref MithrilDB) will completely solve this. +of libmdbx (aka \ref MithrilDB) will completely solve this. - Avoid suspending a process with active transactions. These would then be "long-lived" as above. diff --git a/mdbx.h b/mdbx.h index 6908f969..95caf473 100644 --- a/mdbx.h +++ b/mdbx.h @@ -4270,9 +4270,10 @@ LIBMDBX_API int mdbx_txn_reset(MDBX_txn *txn); * или перезапущена в любой момент посредством \ref mdbx_txn_abort(), * \ref mdbx_txn_reset() и \ref mdbx_txn_renew(), соответственно. * - * \see long-lived-read * \see mdbx_txn_unpark() * \see mdbx_txn_flags() + * \see mdbx_env_set_hsr() + * \see Long-lived read transactions * * \param [in] txn Транзакция чтения запущенная посредством * \ref mdbx_txn_begin(). @@ -4293,9 +4294,9 @@ LIBMDBX_API int mdbx_txn_park(MDBX_txn *txn, bool autounpark); * её перезапуск аналогично \ref mdbx_txn_renew(), либо транзакция сбрасывается * и возвращается код ошибки \ref MDBX_OUSTED. * - * \see long-lived-read * \see mdbx_txn_park() * \see mdbx_txn_flags() + * \see Long-lived read transactions * * \param [in] txn Транзакция чтения запущенная посредством * \ref mdbx_txn_begin() и затем припаркованная @@ -6127,6 +6128,7 @@ LIBMDBX_API int mdbx_thread_unregister(const MDBX_env *env); * with a "long-lived" read transactions. * \see mdbx_env_set_hsr() * \see mdbx_env_get_hsr() + * \see mdbx_txn_park() * \see Long-lived read transactions * * Using this callback you can choose how to resolve the situation: @@ -6201,6 +6203,7 @@ typedef int(MDBX_hsr_func)(const MDBX_env *env, const MDBX_txn *txn, * * \see MDBX_hsr_func * \see mdbx_env_get_hsr() + * \see mdbx_txn_park() * \see Long-lived read transactions * * \param [in] env An environment handle returned @@ -6216,6 +6219,7 @@ LIBMDBX_API int mdbx_env_set_hsr(MDBX_env *env, MDBX_hsr_func *hsr_callback); * recycled. * \see MDBX_hsr_func * \see mdbx_env_set_hsr() + * \see mdbx_txn_park() * \see Long-lived read transactions * * \param [in] env An environment handle returned by \ref mdbx_env_create().