summaryrefslogtreecommitdiffstats
path: root/common/storage_lmdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/storage_lmdb.cpp')
-rw-r--r--common/storage_lmdb.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp
index 227d52e..a8c5cc7 100644
--- a/common/storage_lmdb.cpp
+++ b/common/storage_lmdb.cpp
@@ -562,6 +562,7 @@ public:
562 { 562 {
563 Q_ASSERT(!transaction); 563 Q_ASSERT(!transaction);
564 Q_ASSERT(sEnvironments.values().contains(env)); 564 Q_ASSERT(sEnvironments.values().contains(env));
565 Q_ASSERT(env);
565 // auto f = [](const char *msg, void *ctx) -> int { 566 // auto f = [](const char *msg, void *ctx) -> int {
566 // qDebug() << msg; 567 // qDebug() << msg;
567 // return 0; 568 // return 0;
@@ -816,7 +817,7 @@ public:
816 QString storageRoot; 817 QString storageRoot;
817 QString name; 818 QString name;
818 819
819 MDB_env *env; 820 MDB_env *env = nullptr;
820 AccessMode mode; 821 AccessMode mode;
821 Sink::Log::Context logCtx; 822 Sink::Log::Context logCtx;
822 823
@@ -833,6 +834,7 @@ public:
833 if ((rc = mdb_env_create(&env))) { 834 if ((rc = mdb_env_create(&env))) {
834 SinkWarningCtx(logCtx) << "mdb_env_create: " << rc << " " << mdb_strerror(rc); 835 SinkWarningCtx(logCtx) << "mdb_env_create: " << rc << " " << mdb_strerror(rc);
835 qCritical() << "mdb_env_create: " << rc << " " << mdb_strerror(rc); 836 qCritical() << "mdb_env_create: " << rc << " " << mdb_strerror(rc);
837 env = nullptr;
836 } else { 838 } else {
837 //Limit large enough to accomodate all our named dbs. This only starts to matter if the number gets large, otherwise it's just a bunch of extra entries in the main table. 839 //Limit large enough to accomodate all our named dbs. This only starts to matter if the number gets large, otherwise it's just a bunch of extra entries in the main table.
838 mdb_env_set_maxdbs(env, 50); 840 mdb_env_set_maxdbs(env, 50);