[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#8777) [LMDB] Closing read cursor uses already freed transaction (MDB_VL32)
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#8777) [LMDB] Closing read cursor uses already freed transaction (MDB_VL32)
- From: hyc@symas.com
- Date: Fri, 09 Feb 2018 17:10:25 +0000
- Auto-submitted: auto-generated (OpenLDAP-ITS)
Markus Junginger wrote:
>> There was never a bug here. The doc is quite explicit
>> http://www.lmdb.tech/doc/group__mdb.html#ga73a5938ae4c3239ee11efa07eb22b882
>>
>> After txn_abort the only valid call on a still-open cursor is
>> cursor_renew, not cursor_close.
>
> However you want to call it, are you open to improve this workflow?
>
> API-wise, it would be so much simpler just to free a cursor after it became
> obsolete. It's counter-intuitive to open a new txn, renew the cursor, close
> the cursor, and abort the txn - just to close a cursor.
API-wise, it is much simpler to just close the cursor before closing its
transaction, if you have no need to reuse the cursor.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/