[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#8010) LMDB: New mdb_txn_begin() flag to init as reset



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.