Release of the embedded database libmdbx 0.13

The release of the libmdbx library 0.13.1 (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, including the Russian Elbrus 2000. An advanced API for C++ is offered for libmdbx, along with supported bindings for languages such as 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:

  • Change of license from OpenLDAP Public License to Apache 2.0.
  • Expansion of the cursor API with more convenient and intuitive positioning operations analogous to conditions <, =, > for both keys and key-value pairs. Functions mdbx_cursor_unbind() and mdbx_txn_release_all_cursors() have been added for flexible cursor management in reuse scenarios to reduce overhead. Functions mdbx_cursor_scan() and mdbx_cursor_scan_from() are included for scanning tables using functional predicates while minimizing associated overhead.
  • Refactoring of cursors for behavior unification, more regular code structure, and reduction of branching and machine operations.
  • Moving the functionality of the mdbx_chk utility into the library as the mdbx_env_chk() function for checking the integrity of the database structure, including application logic involvement.
  • The MDBX_opt_gc_time_limit option allows for more flexible control over the time spent searching for adjacent free page sequences during garbage collection.
  • Significant reduction in overhead for launching transactions in scenarios with a large number of DBI handles due to deferred/lazy initialization of auxiliary table elements. This includes a mechanism for supporting sparse sets of DBI handles, controlled by the MDBX_ENABLE_DBI_SPARSE build option, which is enabled by default.
  • Reduced overhead for opening DBI handles. This includes a deferred release mechanism and support for a fast track for opening without using locks, managed by the MDBX_ENABLE_DBI_LOCKFREE build option, which is enabled by default.
  • Support for 'parking' read transactions with their eviction for reprocessing old MVCC snapshots, preventing issues caused by delaying garbage collection. The parking and eviction mechanism for parked transactions serves both as an addition and a simpler alternative to the Handle-Slow-Readers callback. For convenience, the functions mdbx_txn_park() and mdbx_txn_unpark() have additional arguments allowing requests for automatic 'unparking' of parked transactions and restarting evicted ones. The mdbx_copy utility has received corresponding -d and -p options.
  • Support for restoring an open database environment in a child process after a fork/split using mdbx_env_resurrect_after_fork().
  • Support for renaming tables via mdbx_dbi_rename() and mdbx_dbi_rename2(). A function mdbx_enumerate_tables() has been added to retrieve information about named user tables.
  • The MDBX_NOSTICKYTHREADS mode instead of MDBX_NOTLS simplifies integration with lightweight threads, multiplexing them along with OS-level transactions.
  • A UUID for identifying the database has been added, accessible in the mi_dxbid field of the MDBX_envinfo structure, obtained via mdbx_env_info_ex(). It is now possible to retrieve database information without opening it through mdbx_preopen_snapinfo().
  • Support for logging callback functions without the vprintf() functionality, significantly simplifying logging in bindings to other programming languages.
  • Addition of API functions mdbx_txn_copy2pathname() and mdbx_txn_copy2fd().
  • Restructuring of the source code with refactoring.
  • Using the term 'table' instead of 'subDb'.
  • Announcement of the deprecated MDBX_COALESCE and MDBX_NOTLS options. Replacement of the build option MDBX_USE_VALGRIND with the widely accepted ENABLE_MEMCHECK.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster