8000 lmdb-safe forbids concurrent reader/writer in same thread · Issue #9 · ahupowerdns/lmdb-safe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lmdb-safe forbids concurrent reader/writer in same thread #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
horazont opened this issue Nov 7, 2019 · 0 comments
Open

lmdb-safe forbids concurrent reader/writer in same thread #9

horazont opened this issue Nov 7, 2019 · 0 comments

Comments

@horazont
Copy link
Contributor
horazont commented Nov 7, 2019

Currently, lmdb-safe strictly forbids concurrently using a reader and a writer in the same thread:

lmdb-safe/lmdb-safe.cc

Lines 157 to 158 in c0cc016

if(d_parent->getROTX() || d_parent->getRWTX())
throw std::runtime_error("Duplicate RW transaction");

However, from my reading of the documentation, this is fine to do with LMDB, at least if the environment was opened with MDB_NOTLS (which lmdb-safe does). My tests also indicate that (I simply commented out the getROTxn part).

Did I overlook anything?

horazont added a commit to horazont/lmdb-safe that referenced this issue Dec 16, 2019
This is supported by LMDB if the MDB_NOTLS flag is set on the
environment, which it always is with lmdb-safe.

Fixes ahupowerdns#9.
Martchus pushed a commit to Martchus/lmdb-safe that referenced this issue Jan 18, 2022
This is supported by LMDB if the MDB_NOTLS flag is set on the
environment, which it always is with lmdb-safe.

Fixes ahupowerdns#9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0