[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openldap-technical
Subject:    Re: Thread Safety in LMDB with MDB_NOTLS and Readonly Cursors
From:       Howard Chu <hyc () symas ! com>
Date:       2023-11-08 16:56:15
Message-ID: dadaaa8a-3ff7-6322-c294-5e46d8dc9092 () symas ! com
[Download RAW message or body]

xiaoya2wei@gmail.com wrote:
> Thanks Howard,
> 
> Then I guess I have 2 follow-up questions:
> 
> 1. 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.

> 2. 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.


-- 
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic