summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/storage_lmdb.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp
index f7d38a1..b00521d 100644
--- a/common/storage_lmdb.cpp
+++ b/common/storage_lmdb.cpp
@@ -240,6 +240,9 @@ public:
240 * We solve this the following way: 240 * We solve this the following way:
241 * * For read-only transactions we abort the transaction, open the dbi and persist it in the environment, and reopen the transaction (so the dbi is available). This may result in the db content changing unexpectedly and referenced memory becoming unavailable, but isn't a problem as long as we don't rely on memory remaining valid for the duration of the transaction (which is anyways not given since any operation would invalidate the memory region).. 241 * * For read-only transactions we abort the transaction, open the dbi and persist it in the environment, and reopen the transaction (so the dbi is available). This may result in the db content changing unexpectedly and referenced memory becoming unavailable, but isn't a problem as long as we don't rely on memory remaining valid for the duration of the transaction (which is anyways not given since any operation would invalidate the memory region)..
242 * * For write transactions we open the dbi for future use, and then open it as well in the current transaction. 242 * * For write transactions we open the dbi for future use, and then open it as well in the current transaction.
243 * * Write transactions that open the named database multiple times will call this codepath multiple times,
244 * this is ok though because the same dbi will be returned by mdb_dbi_open (We could also start to do a lookup in
245 * Transaction::Private::createdDbs first).
243 */ 246 */
244 SinkTrace() << "Creating database dynamically: " << dbiName << readOnly; 247 SinkTrace() << "Creating database dynamically: " << dbiName << readOnly;
245 //Only one transaction may ever create dbis at a time. 248 //Only one transaction may ever create dbis at a time.