The release of the libmdbx 0.13.2 (MDBX) library is 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, including the Russian Elbrus 2000. An advanced API for C++ is offered for libmdbx, along with community-supported bindings for languages like 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:
- GC updates are accelerated when returning/placing page lists in complex scenarios. The previously disabled experimental feedback correction mode has been revised and activated. This fundamentally improved convergence (reduced the number of retries) and eliminated a defect that led to ‘looping’ during transaction commits (returning an MDBX_PROBLEM error) under rare specific conditions.
- The CMake build scripts now include the C23 standard.
- T-macros for paired char/wchar_t functions have been added.
- Support for nested write transactions has been added to the C++ API.
- Migrated to the second edition of the Semantic Versioning specification (‘Semantic Versioning 2’) and ensured that version information is exported to VERSION.json.
- To enhance reproducibility of builds, support for the SOURCE_DATE_EPOCH environment variable has been added. Support for MDBX_BUILD_TIMESTAMP is maintained, and this variable takes priority.
- The ability to specify additional build information for libmdbx via the MDBX_BUILD_METADATA option has been added. Currently, the specified information is simply included within the library as the value of mdbx_build.metadata, and will later be used in package formation, etc.
- Error logging from the API has been added. Now, it's sufficient to set the logging level to MDBX_LOG_DEBUG (to log errors excluding MDBX_NOTFOUND) or MDBX_LOG_TRACE (to log all errors as well as MDBX_RESULT_TRUE).
- Behavior change:
- The method mdbx::cursor::get_multiple_samelength() has been added, and mdbx::txn::put_multiple_samelength() has been renamed.
- For consistency in the C++ API, when performing the MDBX_GET_MULTIPLE operation, the key value is now also returned.
- For size constants mdbx::env::geometry, the base type has been changed from unsigned size_t to signed intptr_t.
- The choice to use ntdll instead of CRT is now only made when explicitly disabling the C++ API.
- Memory release for aborted/read transactions passed to mdbx_txn_commit() is ensured. The API agreement requires such transactions to be released via mdbx_txn_abort(), which caused the mdbx_txn_commit() function to return an error in such cases, without destroying the transactions themselves. This led to memory leaks due to application errors, prompting a change in behavior.
- Use of the __deprecated_enum macro, if defined.
- When building with CMake, the selection of the C language standard is now considered with CMAKE_C_STANDARD.
Source: opennet.ru
