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().