I like the property of mapping this memory as read-only.
All writes should have been deferred to the policy-loader,
at least in normal operation.
/* Cache doesn't require durability, we can be
* loose with the requirements as a tradeoff for speed. */
? MDB_WRITEMAP | MDB_NOTLS | MDB_MAPASYNC
- : MDB_WRITEMAP | MDB_NOTLS;
+ /* ruledb is quite different in terms of writes.
+ * MDB_WRITEMAP|MDB_MAPASYNC wouldn't benefit us much,
+ * so instead we get better protection + (integrity on crashes).*/
+ : MDB_NOTLS;
ret = mdb_env_open(env->env, path, flags, LMDB_FILE_MODE);
if (ret != MDB_SUCCESS) goto error_mdb;