Sam Dave wrote: > Thanks for the reply. > > That's what it says on its own, but the doc also says: > > * The database handle will be private to the current transaction until > * the transaction is successfully committed. If the transaction is > * aborted the handle will be closed automatically. > * After a successful commit the handle will reside in the shared > * environment, and may be used by other transactions. > > That suggests I have to wait for a transaction to finish before I can reuse > the same db handle for other transactions.
No, that's not at all what it says. *Opening* a DBI handle can only be done by one transaction. *Using* an open DBI handle can be done by any transactions. > How would you in practice perform multiple transactions at the same time? I > don't see it yet. I'm missing something basic. > > > Feb 11, 2019, 5:50 AM by h...@symas.com: > > Sam Dave wrote: > > Hello, > > The doc for mdb_dbi_open says: > > * This function must not be called from multiple concurrent > * transactions in the same process. A transaction that uses > * this function must finish (either commit or abort) before > * any other transaction in the process may use this function. > > This indicates that each process can only perform one transaction at > the same time. > > > No, it only says you may only call mdb_dbi_open from one transaction at a > time. > > This makes sense for write transactions, but wasn't LMDB supposed to > support multiple read transactions at the same time? > > I'm a bit confused now. Can you assist? > > Thanks, > Sam > > > > -- > -- Howard Chu > CTO, Symas Corp. http://www.symas.com > Director, Highland Sun http://highlandsun.com/hyc > <http://highlandsun.com/hyc/> > Chief Architect, OpenLDAP http://www.openldap.org/project > <http://www.openldap.org/project/> > > -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/