[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: reusing transactions in LMDB
- To: Tim Uckun <timuckun@gmail.com>, openldap-technical@openldap.org
- Subject: Re: reusing transactions in LMDB
- From: Howard Chu <hyc@symas.com>
- Date: Mon, 21 Nov 2016 18:19:12 +0000
- In-reply-to: <WM!fdad9a2840d0d021c5b6ed91e52c7ac3b4ef655672f6d9a8d8a83e73b9df001a95edda9b0895fd52e873f808c3ac550b!@mailstronghold-1.zmailcloud.com>
- References: <CAGuHJrOL-U0-YqNYUXGCSCUbU=rsAEv=yP=WdFWKh-znLtZ_yg@mail.gmail.com> <WM!fdad9a2840d0d021c5b6ed91e52c7ac3b4ef655672f6d9a8d8a83e73b9df001a95edda9b0895fd52e873f808c3ac550b!@mailstronghold-1.zmailcloud.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46a2
Tim Uckun wrote:
Another question regarding my wrapper for lmdb.
The comments say it's possible to reuse read only transactions but says
nothing about reusing the read write transactions. Does this mean every write
operation needs a fresh transaction?
No. You can perform multiple write operations in a single transaction.
Is there any downsides to not
implementing the reuse functions for the wrapper?
There is a performance gain from reusing read transactions.
I figure the use case is
quite limited and frankly I would have to manage all the transaction pointers
to make sure they were being used property.
Also I noticed that every call to mdb_txn_id returns 1 even for different
transactions. Is this normal?
http://lmdb.tech/doc/group__internal.html#a26512036328af11cdaeb6c9880859290
Thanks.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/