The release of the libmdbx 0.13.6 (MDBX) library has been published, featuring a high-performance compact embedded key-value database. The libmdbx code is distributed under the Apache 2.0 license. It supports all major operating systems and architectures, including the Russian Elbrus 2000. A robust API for C++ is available for libmdbx, as well as community-supported bindings for Rust, Haskell, Python, NodeJS, Ruby, Go, Nim, Deno, and Scala. Notable projects using libmdbx include Isar, Erigon, and Reth, as well as developments from StarkWare and Positive Technologies.
Historically, libmdbx is a deep rewrite of the LMDB database and surpasses its predecessor in reliability, feature set, and performance. Compared to LMDB, libmdbx places great emphasis on code quality, stable API operation, testing, and automated checks. It comes with a database structure integrity check utility that includes some recovery options. Technologically, libmdbx offers ACID compliance, strict change serialization, and non-blocking reads with linear scaling across CPU cores. It supports automatic compaction, automatic database size management, and range query estimation.
Key Changes:
- Behavior change: When it is impossible to unbind the cursor from its current transaction, the function mdbx_cursor_bind() now returns MDBX_EINVAL instead of MDBX_BAD_TXN.
- To avoid potential issues, the use of copy_file_range() has been disabled on Linux kernels 5.3 — 5.18.
- A throw of std::invalid_argument is now explicitly made with the message MDBX_EINVAL.
- A regression when using cursors for DBI=0 (aka GC/FreeDB) in read transactions has been fixed.
- A regression leading to the EAGAIN error when copying a database on NFS and CIFS/SMB has been corrected.
- In the enhancements/development of the API, the file lock acquisition was added in the copy function using both fcntl() and flock(). However, depending on the version of the local kernel, the version of the remote server NFS, and the mount options, this could lead to a return of the POSIX error EAGAIN (11 on most platforms, including Linux).
- A merge/rebase bug inside mdbx_txn_release_all_cursors_ex() that could lead to subsequent unexpected errors MDBX_EBADSIGN and memory leaks has been fixed.
- An assert check in the completion path of nested transactions has been corrected.
- An unexpected MDBX_BUSY error return from mdbx_txn_lock(dont_wait=false) has been eliminated.
- For compatibility with GCC 15.x in C23 mode, the order of function attributes has been changed.
Source: opennet.ru
