Closed emuellen closed 1 month ago
Hey @emuellen 👋
I want to use the same read-transaction across several threads in my application.
This is not possible and is disallowed by LMDB. You can find more information about this cargo feature in the TOML. To be able to read your database from different threads I recommend you to open one transaction by thread, read transactions can be moved between thread when the read-txn-no-tls
feature is enabled (RoTxn: Send
) but will never be Sync.
Please look at my blog post about LMDB and Meilisearch and the different safe tricks and techniques you can use.
Have a nice day 🧇
Hello, I want to use the same read-transaction across several threads in my application. I activated the feature in my Cargo.toml as follows:
This is the code snippet in question:
Now, the compiler returns this error:
Am I doing something wrong or is it because Send is not implemented for lmdb_master_sys::MDB_txn ?
Thanks a lot for your help!