Gábor Melis wrote: > On Fri, 14 Aug 2020 at 02:14, Howard Chu <[email protected]> wrote: >> In a default build, read txns are always safe. No guarantees on >> an interrupted write txn. > > Are reads (mdb_get) in a write txn also problematic or would it be > async unwind safe? > > For example, a quick look at mdb_get did not reveal any side-effecting > operations except > changing flags of the throw-away cursor. I could have easily missed > some, though.
In a default build, reads in a write txn should be safe. If a thread is interrupted in the middle of a write op and not resumed where it left off, then you'll probably need to abort the active txn and close the environment. Nothing on-disk will be damaged, but in-memory bookkeeping will probably be corrupted by such an interruption. > Thank you for the quick answers, > Gábor > -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
