summaryrefslogtreecommitdiffstats
path: root/common/index.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-05-21 19:48:09 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-05-23 13:55:15 +0200
commit4cb0d1561cf41551d4ddc418f8666388b90318b9 (patch)
tree2efb1dbc7a8627893b3b0ddd9f95d08dda6b7e8f /common/index.h
parentfa9e0e2cbbcb0733e86a47f489296f58fbcf34af (diff)
downloadsink-4cb0d1561cf41551d4ddc418f8666388b90318b9.tar.gz
sink-4cb0d1561cf41551d4ddc418f8666388b90318b9.zip
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.
Diffstat (limited to 'common/index.h')
0 files changed, 0 insertions, 0 deletions