One of the fastest embeddable key-value ACID database without WAL. libmdbx surpasses the legendary LMDB in terms of reliability, features and performance.
Windows is unable to extend or shrink mapped region without closing/unmap it.
Theresofre, on Windows a SRW-lock is used to protect threads with a read transaction from accessing a temporary unmapped region during it shrink or expand.
However, with MDBX_NOTLS option transactions could be used from other threads and the same thread could start more than one read transaction.
Currently, to prevent this, libmdbx does not shrink a DB file and does not increase the mapping size when using the MDBX_NOTLS option.
So SRW-lock should be replaced by a custom recursive untied-to-thread lock.
Windows is unable to extend or shrink mapped region without closing/unmap it. Theresofre, on Windows a SRW-lock is used to protect threads with a read transaction from accessing a temporary unmapped region during it shrink or expand. However, with
MDBX_NOTLS
option transactions could be used from other threads and the same thread could start more than one read transaction. Currently, to prevent this, libmdbx does not shrink a DB file and does not increase the mapping size when using theMDBX_NOTLS
option.So SRW-lock should be replaced by a custom recursive untied-to-thread lock.