diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-10-28 01:42:24 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-10-28 01:43:06 +0200 |
commit | d8669ccf3d4429e44caa87e2592b3bc3afa4e41c (patch) | |
tree | c038682ff7792325c760a6a0aa514d977b2c294d /src | |
parent | Fix PLAT being wrong for m1 builds (diff) | |
download | nheko-d8669ccf3d4429e44caa87e2592b3bc3afa4e41c.tar.xz |
Turn metasync and sync back on for the database to account for bad filesystems
Diffstat (limited to 'src')
-rw-r--r-- | src/Cache.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp index 4f1fed1c..e090e40d 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -293,7 +293,10 @@ Cache::setup() // NOTE(Nico): We may want to use (MDB_MAPASYNC | MDB_WRITEMAP) in the future, but // it can really mess up our database, so we shouldn't. For now, hopefully // NOMETASYNC is fast enough. - env_.open(cacheDirectory_.toStdString().c_str(), MDB_NOMETASYNC | MDB_NOSYNC); + // + // 2022-10-28: Disable the nosync flags again in the hope to crack down on some database + // corruption. + env_.open(cacheDirectory_.toStdString().c_str()); //, MDB_NOMETASYNC | MDB_NOSYNC); } catch (const lmdb::error &e) { if (e.code() != MDB_VERSION_MISMATCH && e.code() != MDB_INVALID) { throw std::runtime_error("LMDB initialization failed" + std::string(e.what())); |