]> git.saurik.com Git - redis.git/blobdiff - src/redis.c
Fix key archival configuration from static config.
[redis.git] / src / redis.c
index b1c34ebb765a98b653255327153213047a6265a4..2cc46e5b47c132a99c0369bdaea12ca0aa8b92bf 100644 (file)
@@ -49,6 +49,7 @@
 #include <math.h>
 #include <sys/resource.h>
 #include <sys/utsname.h>
+#include <lmdb.h>
 
 /* Our shared "common" objects */
 
@@ -1347,6 +1348,15 @@ void initServer() {
         }
     }
 
+    if (server.mdb_state == REDIS_MDB_ON) {
+        int retval = startKeyArchive();
+        if (retval != 0) {
+            redisLog(REDIS_WARNING, "Can't open the key-archive environment: %s",
+                mdb_strerror(retval));
+            exit(1);
+        }
+    }
+
     /* 32 bit instances are limited to 4GB of address space, so if there is
      * no explicit limit in the user provided configuration we set a limit
      * at 3 GB using maxmemory with 'noeviction' policy'. This avoids