Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

Windows's SRW-lock should be replaced by a custom recursive untied-to-thread lock. #210

Open
erthink opened this issue Jun 18, 2021 · 1 comment

Comments

@erthink
Copy link
Owner

erthink commented Jun 18, 2021

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.

@erthink
Copy link
Owner Author

erthink commented Jun 18, 2021

In continue to #203, pre-requirement for #200.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant