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

Re: (LMDB) read-only transactions and DBI handles



 
Hi, 

> Viacheslav Usov <via.usov@gmail.com> hat am 11. Dezember 2015 um 12:38
> geschrieben:
> However, LMDB's API with respect to sub-databases and transactions is not
> orthogonal [2]. 
> With an orthogonal API, a DBI handle would > remain valid as long as the
> underlying sub-database existed, 
> regardless of commits and aborts in transactions using it.

as I understand it (and am practicing it), the dbi is created by one transaction
and remains valid after that transaction commits until it is either explicitly
closed or the environment dies. What *is* somewhat awkward is the fact that it
can be a read transaction that creates it. In my application, I am creating a
dbi handle for each (sub-)database using a short transaction for just that
purpose and then save it somewhere.

Chris