xiaoya2wei@gmail.com wrote:
Thanks Howard,
Then I guess I have 2 follow-up questions:
- Just to confirm (something I didn't get a clear answer): when MDB_NOTLS is set, a cursor opened by a rw txn can be serially accessed by multiple threads, one at a time. Is this write?
No. MDB_NOTLS has no relevance to rw txns. The docs state quite clearly that it only affects read-only txns. Read more carefully.
- What does "Cursors may not span transactions" specifically mean? In my understanding, a cursor belongs to one and only one txn, I didn't find an LMDB API that allows users to operate a cursor with some random transactions?
Read more carefully.