Skip to content

v0.43.0 — libmdbx v0.14.3

Latest

Choose a tag to compare

@AskAlexSharov AskAlexSharov released this 16 Aug 05:03
· 3 commits to master since this release
f8b27ce

Vendored libmdbx moves from v0.14.2 (530d0265, 2026-05-14) to the v0.14.3 "Китов" (Kitov) release (2026-08-09). No Go API changes — the only source edits are one constant remapping and Godoc.

Data-loss and hang fixes

  • Copy without compaction produced a copy without payload. In v0.14.2 a non-compacting mdbx_env_copy built the destination meta-pages from the empty model — the source tree roots and geometry were never carried over — so the copy opened cleanly and read as an empty database. Verified fixed here: a fill/copy/re-read probe over MDBX_CP_DEFAULTS and MDBX_CP_FORCE_DYNAMIC_SIZE round-trips the full payload, where the same probe read an empty database against v0.14.2.
  • Lost table content after aborting a nested transaction that dropped the table.
  • Infinite loop in mdbx_txn_abort() from a memcmp()/memcpy() typo.
  • env_owned_wrtxn() bypassed locking under MDBX_NOSTICKYTHREADS — the mode mdbx-go always sets.
  • Major typo in latch_maindb_locked(); missing return on an error path in mdbx_cursor_bind().

Spilling and cursors

Fixes concentrated in large write transactions: committing a pure nested transaction that has spilled pages; leak of the spilled-pages list on nested-transaction abort; tracking and invalidation of the inner part of sibling cursors; the cursor stack reworked around a page stash; spilling and accounting corrected for MDBX_AVOID_MSYNC=ON.

Leaks

mach_port_t in mdbx_get_sysraminfo(), Windows section handle in osal_mresize(), table name in dbi_open_locked(), cond_pair in copy_with_compacting().

Windows

ERROR_LOCK_VIOLATION during defrag in overlapped-I/O modes; lost global init and TLS destructors in MinGW static builds; /experimental:c11atomics workaround plus a compile-time guard against wrong MSVC codegen for C11 atomics on non-x86.

Go side

  • NoTLS now maps to MDBX_NOSTICKYTHREADS. libmdbx removed the deprecated MDBX_NOTLS alias, superseded by MDBX_NOSTICKYTHREADS since 0.13. The constant stays Deprecated, keeps the same value and keeps existing callers compiling — prefer NoStickyThreads.
  • Env.Open now documents a deadlock risk. As of libmdbx 0.14.x the env functions that need the writer lock but take no txn — SetFlags, SetOption, SetGeometry, Sync/SyncForce/SyncPoll, Stat/Info(nil), Close — acquire that lock when the calling goroutine does not own the in-flight write transaction. mdbx-go always sets NoStickyThreads, so calling one of them from a goroutine the writer is waiting on can deadlock. Make such calls from the writer's own goroutine, or while no write transaction is running.
  • Env.Sync Godoc no longer names MapAsync, an upstream-removed alias mdbx-go never exposed.

mdbx_replace_ex() changed upstream to return only previous data, never new — mdbx-go does not bind it.

Full changelog: v0.42.0...v0.43.0