Issue 8010 - LMDB: New mdb_txn_begin() flag to init as reset
Summary: LMDB: New mdb_txn_begin() flag to init as reset
Status: VERIFIED DUPLICATE of issue 8250
Alias: None
Product: LMDB
Classification: Unclassified
Component: liblmdb (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-23 03:30 UTC by scott@gameranger.com
Modified: 2021-06-02 15:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description scott@gameranger.com 2014-12-23 03:30:31 UTC
Full_Name: Scott Kevill
Version: n/a
OS: n/a
URL: 
Submission from: (NULL) (101.166.148.57)


Using a read-only txn with mdb_txn_reset() and mdb_txn_renew() is a little
clumsy at the moment because the first use needs to be a mdb_txn_begin().

This means either an initial mdb_txn_begin() + mdb_txn_reset() to get it into
the reset state, or else for every operation to do something like:

if (txn)
    mdb_txn_renew()
else
    mdb_txn_begin()

... do work ...

mdb_txn_reset()

An additional flag (eg. MDB_RESET?) for mdb_txn_begin() that only worked in
conjunction with MDB_RDONLY could save that (minor) wasted work.
Comment 1 Howard Chu 2021-06-02 13:24:32 UTC

*** This issue has been marked as a duplicate of issue 8250 ***