Diffusion Sink 4cb0d1561cf4

Fixed use of mdb_dbi_open

Authored by cmollekopf on May 21 2018, 5:48 PM.

Description

Fixed use of mdb_dbi_open

There can only ever be one transaction using mdb_dbi_open running,
and that transaction must commit or abort before any other transaction
attempts to use mdb_dbi_open.

Use delayed dbi merging with write transactions and a temporary
transaction for read transactions.

We now protect dbi initialization with a mutex and immediately update
the sDbis hash. This assumes that the created dbis are indeed
We can still violate the only one transaction may use mdb_dbi_open rule
if we start a read-only transaction after the write transaction, before
the write transaction commits.

It does not seem to be something we actually do though.

Opening dbis on environment init is further separated out, so we don't
end up in the regular openDatabase codepath at all.

Details

Committed
cmollekopfMay 23 2018, 11:55 AM
Parents
R9:fa9e0e2cbbcb: Assert that we have a QGuiApplication if we crash otherwise.
Branches
Unknown
Tags
Unknown