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

Re: (ITS#7994) [LMDB] Feature Request: Access to current transaction ID.

dmbarbour@gmail.com wrote:
> Full_Name: David Barbour
> Version: LMDB 0.9.10
> OS: Ubuntu
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (2602:306:80bb:160:d913:da7:da0f:76b3)
> As discussed on the list [1], I believe access to the current transaction ID
> could be very useful for layering features above LMDB, such as concurrent
> writers, read-only to read-write promotion, or serving as an e-tag for polling.
> A patch David-Barbour-141205.patch has been uploaded and includes a disclaimer
> to public-domain.
> [1] http://www.openldap.org/lists/openldap-devel/201412/msg00000.html
Thanks. There's a slight problem with the patch, your function returns 
MDB_txnid_t but that is a private typedef in mdb.c. It is not defined in 
lmdb.h, so no one will be able to compile and use this code.

Easiest change would be to just return size_t, like MDB_envinfo uses.

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