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

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

Viacheslav Usov wrote:
On Fri, Dec 11, 2015 at 2:51 PM, Howard Chu <hyc@symas.com
<mailto:hyc@symas.com>> wrote:

 > A DBI handle is simply a slot in an in-memory array. Read-only transactions
are read-only with respect to the database.

That is fine with me. It was you who tried to explain the DBI handles in terms
of 'transactional databases" [1]. That explanation was problematic; copying
your manner of speaking, one could say it was "utter nonsense".

Can you clarify just this point: in sample-mdb.txt, a DBI handle is opened in
the first transaction, which commits, and is used the second transaction,
which aborts. What happens with the DBI handle when the second transaction
aborts? Does it stay valid or does it get closed?

What happens when you write a record to the DB in the first transaction, which commits? When you start a second transaction, which aborts, does that record stay, or does it disappear?

What does the word "persist" mean?

Aborting a transaction only discards the operations that occurred within that transaction.

> There was another question in my
message that you did not answer. I am copying it here for convenience.

And I am ignoring it, again.

Can you confirm that, with read-only transactions, the only difference between
commit and abort is in the way the associated DBI handles are treated, and,
specifically, that no observable effect on performance will occur? If that is
so, a note in the documentation stating this would be very helpful.


[1] Howard Chu: "Transactional databases are very simple"

  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/