Skip to main content

enable_legacy_multiopen

Function enable_legacy_multiopen 

Source
pub fn enable_legacy_multiopen()
Available on crate feature provider and (crate features test-utils) only.
Expand description

Enables MDBX legacy multi-open mode, allowing the same database to be opened multiple times within a single process. This is needed for tests that simulate concurrent primary + read-only secondary provider scenarios.

Must be called before any MDBX environment is opened.

ยงSafety

This uses MDBX_DBG_LEGACY_MULTIOPEN which recovers POSIX file locks on close. It may cause unexpected pauses and does not perfectly mirror multi-process behavior. Use only in tests.