[Date Prev][Date Next]
RE: question on write transaction
Thanks for pointing me out
From: Howard Chu [mailto:email@example.com]
Sent: Tuesday, August 4, 2015 9:46 AM
To: Shu, Xinxin; firstname.lastname@example.org
Subject: Re: question on write transaction
Shu, Xinxin wrote:
> Hi list, recently I wrote app on LMDB, found that for every write , lmdb lock a global lock when transaction is created , and release this lock in mdb_txn_commit, on Ubuntu, this lock is implemented by pthread_mutext_t. in my app, I create write transaction in a thread, then commit this write transaction in another thread, since lmdb use pthread_mutex_unlock to release this lock, according to manual , attempting to unlock the mutex if it was not locked by the calling thread results in undefined behavior, then my app cannot create write transaction . So does this issue known to community or is there any way to work around?
This is already documented.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/