Release of the embedded DBMS libmdbx 0.13.7

The release of the libmdbx 0.13.7 (MDBX) library has been published, implementing a high-performance compact embedded key-value database. The libmdbx code is distributed under the Apache 2.0 license. All current operating systems and architectures are supported, as well as the Russian Elbrus 2000. libmdbx offers an advanced API for C++, as well as enthusiast-supported bindings to the Rust, Haskell, Python, NodeJS, Ruby, Go, Nim, Deno, Scala languages. Among the projects using libmdbx, we can note Isar, Erigon, and Reth, as well as developments by StarkWare and Positive Technologies.

Historically, libmdbx is a deep reworking of the LMDB DBMS and surpasses its ancestor in reliability, feature set and performance. Compared to LMDB, libmdbx pays much attention to code quality, stable API operation, testing and automatic checks. A utility for checking the integrity of the database structure with some recovery capabilities is supplied. Technologically, libmdbx offers ACID, strict serialization of changes and non-blocking reading with linear scaling across CPU cores. Auto-compaction, automatic database size management, range query estimation are supported.

Major changes:

  • Fixed a critical bug in the mdbx_env_resurrect_after_fork() functionality when using SysV semaphores. The error appeared only after spawning a child process via fork() against the background of an ongoing write transaction, which led to incorrect operation of semaphores and then to various errors, including database corruption. The problem existed since the advent of mdbx_env_resurrect_after_fork() and affected macOS, as well as POSIX platforms when building with the MDBX_LOCKING=5 option.
  • Fixed a problem in the DB Copy API that occurred on non-Linux POSIX systems (mostly macOS), and in some cases when the target file was located on a non-local file system. The problem resulted in the return of the EWOULDBLOCK/EAGAIN error, which was caused by a flaw/conflict in the fcntl(F_SETLK) and flock() locks in the OS kernel. Reworked the handling of file lock acquisition errors in the Copy API on POSIX systems.
  • Fixed a bug that caused an unexpected return of MDBX_BAD_DBI when starting multiple transactions simultaneously within a single process after opening a database.
  • Fixed a bug that caused MDBX_DBS_FULL to be unexpectedly returned when reopening already open tables and the open DBI handle limit had already been reached.
  • Fixed build error for Android platform when _FILE_OFFSET_BITS is explicitly defined.
  • Fixed a bug with using ENOMEM instead of MDBX_ENOMEM. Which could break the build on non-POSIX/Windows platforms, depending on the configuration and/or SDK version.
  • Fixed or removed several incorrect assertions that caused debug builds to crash in specific situations, primarily in the code for txn_end(), txn_lock(), and txn_unlock() on both Windows and POSIX.
  • Fixed minor MSVC warnings. Disabled warnings C5286 and C5287.
  • The logic for refusing to use OFD locks on POSIX platforms has been improved. Now, in addition to EINVAL, additional error codes are taken into account (ENOSYS, ENOIMPL, ENOTSUP, ENOSUPP, EOPNOTSUPP), which will allow the compiled library to work in some cases when the current kernel/container/emulator does not support the required system calls.
  • The test framework now supports the --numa option. » to bind the stochastic test to a NUMA node. Explicit distribution across NUMA nodes has been added to the battery/tmux script, which has significantly increased the efficiency when testing on NUMA machines.
  • The stochastic script implements a random order in which individual tests are run.

Source: opennet.ru

Add a comment