The release of the libmdbx 0.11.3 (MDBX) library has taken place, featuring a high-performance, compact embedded key-value database. The libmdbx code is distributed under the OpenLDAP Public License. It supports all current operating systems and architectures, as well as the Russian Elbrus 2000. As of the end of 2021, libmdbx is used as a storage backend in the two fastest Ethereum clients—Erigon and the new 'Shark', which is reportedly the highest-performing Ethereum client.
Historically, libmdbx is a significant rework of the LMDB database and surpasses its predecessor in terms of reliability, features, 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 with some recovery capabilities is included.
Technologically, libmdbx offers ACID compliance, strict change serialization, and non-blocking reads with linear CPU core scalability. It supports auto-compaction, automatic database size management, and range query estimation. Since 2016, the project has been funded by Positive Technologies and has been utilized in its products since 2017.
A C++ API is offered for libmdbx, along with community-supported bindings for languages such as Rust, Haskell, Python, NodeJS, Ruby, Go, and Nim.
Key innovations, improvements, and fixes added since the last update on October 11 include:
- The C++ API is considered ready for use.
- Data GC updates have been significantly accelerated when committing large transactions, which is particularly relevant when using libmdbx within the Ethereum ecosystem.
- The internal signature of the database format has been modified to support automatic updates, which is fully transparent to users. This eliminates false-positive messages about database corruption when outdated library versions are used to read transactions committed by current versions.
- New functions mdbx_env_get_syncbytes(), mdbx_env_get_syncperiod(), and mdbx_env_get_syncbytes() have been added. Support for the MDBX_SET_UPPERBOUND operation has been introduced.
- All warnings during compilation with all supported compilers in C++ 11/14/17/20 modes have been eliminated. Compatibility with legacy compilers has been ensured: clang starting from 3.9, gcc starting from 4.8, including builds via devtoolset-9 for CentOS/RHEL 7.
- The possibility of conflict with meta-pages after manually switching to a specific meta-page using the mdbx_chk utility has been eliminated.
- Fixed unexpected MDBX_PROBLEM error when rewriting outdated meta-pages.
- Fixed the return of MDBX_NOTFOUND in case of inaccurate matching when processing the MDBX_GET_BOTH request.
- Resolved a compilation error on Linux due to missing header files with interface descriptions from the kernel.
- Corrected a collision between the internal flag MDBX_SHRINK_ALLOWED and the MDBX_ACCEDE option.
- Eliminated several unnecessary assert checks.
- Fixed an unexpected return of MDBX_RESULT_TRUE from the mdbx_env_set_option() function.
- In total, over 90 changes were made in 25 files, adding approximately 1300 lines and removing about 600.
Source: opennet.ru
