The release of the libmdbx library 0.13.3 (MDBX) 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 current operating systems and architectures, as well as the Russian Elbrus 2000. An advanced API for C++ is provided for libmdbx, along with community-supported bindings for Rust, Haskell, Python, NodeJS, Ruby, Go, Nim, Deno, and Scala.
Historically, libmdbx is a thorough overhaul 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. A database structure integrity checking utility is provided with some recovery options. Technologically, libmdbx offers ACID compliance, strict change serialization, and non-blocking reads with linear scaling across CPU cores. Automatic compaction, automatic database size management, and range query estimation are also supported.
Key Changes:
- The 0.13.x branch has been designated as stable. Development of the 0.14.x branch has commenced.
- The C API has introduced the mdbx_cursor_count_ex() function, which allows retrieving both the count of multi-values corresponding to the current key and information about the nested tree storing these values.
- The C++ API has added the method mdbx::txn::make_broken(), similar to mdbx_txn_break().
- Error, warning, and important message logging from libmdbx has been implemented in the utilities mdbx_copy, mdbx_drop, mdbx_dump, mdbx_load, and mdbx_stat.
- Behavior change:
- When enabling garbage collector profiling (building with the option MDBX_ENABLE_PROFGC=ON), CPU time spent on merging page lists, i.e., the work of the pnl_merge() function, is now counted.
- In the testing utility, the data mode value has been renamed from data.dups to data.multi.
- Key length checking has been improved inside cursor_seek().
- If the user has not explicitly set a value using mdbx_env_set_option(MDBX_opt_txn_dp_limit), the dirty-pages-limit will be adjusted at the start of each non-nested writing transaction based on the available RAM and database size.
- In the MDBX_NOSTICKYTHREADS mode, committing/aborting nested transactions from any thread is allowed.
- When attempting to start nested transactions in MDBX_WRITEMAP mode, logging occurs and the MDBX_INCOMPATIBLE error is returned.
- In the C++ API, constructors/initializers and methods related to forming the database geometry default to using only default values.
- Heuristics have been improved within mdbx_env_set_geometry() for selecting the database geometry parameters requested by the user as 'default'.
- Fixes:
- A regression that prevented unlocking the mutex when attempting to close the dbi descriptor again has been eliminated, including when trying to explicitly close the descriptor after deleting the associated table.
- A regression of the nested/dupsort cursor state after inserting data in MDBX_APPEND mode has been resolved.
- Support for obtaining boot_id while operating within an LXC container has been added.
- The error of incorrect handling of attempts to start nested read transactions has been resolved. Now in such situations, the error MDBX_EINVAL is returned, as nesting is only supported for read-write transactions.
- The SIGSEGV regression of accessing a null address while operating in read-only mode without using an LCK file has been fixed, for example, when placing the database on a read-only accessible medium.
Source: opennet.ru
