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
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/
I typedef'd MDB_txnid_t at the top of lmdb.h. The patch also tweaks MDB_envinfo. On Fri, Dec 5, 2014 at 11:58 AM, Howard Chu <hyc@symas.com> wrote: > > 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. >
added to mdb.master
changed notes changed state Open to Test moved from Incoming to Software Enhancements
changed state Test to Closed