erthink / libmdbx

One of the fastest embeddable key-value ACID database without WAL. libmdbx surpasses the legendary LMDB in terms of reliability, features and performance.
https://erthink.github.io/libmdbx/
Other
1.16k stars 111 forks source link

Read transactions #252

Closed venkat-murty closed 2 years ago

venkat-murty commented 2 years ago

Can read transactions be shared across multiple threads simultaneously ? Ex: Thread 0: txn = open a READ ONLY transactions. spawn threads 1 and 2 (passing txn). join threads 1 and 2. close txn.

Thread 1 read using txn

Thread 2: read from txn

erthink commented 2 years ago

Please RTFM about the MDBX_NOTLS. However, you should not perform any actions with the same transaction object simultaneously from different threads, including open/close a cursors, etc.