summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-02-23 21:34:55 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2023-02-23 21:34:55 +0100
commitd46a67f64b43814c09172ec9c950cbf5666548ac (patch)
tree1f67e751138b3ca3b37d62d90a4e9d76d1e1f889 /src
parentMerge pull request #1374 from Nheko-Reborn/private_images (diff)
downloadnheko-d46a67f64b43814c09172ec9c950cbf5666548ac.tar.xz
Reenable the nosync options for the database
fixes #1355

So far we haven't seen any reduction in issues about database
corruption, so presumably this is unrelated and the lag is annoying.
Diffstat (limited to 'src')
-rw-r--r--src/Cache.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp

index 0879d36f..b27a8b37 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp
@@ -290,7 +290,12 @@ Cache::setup() // // 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); + // 2023-02-23: Reenable the nosync flags. There was no measureable benefit to resiliency, + // but sync causes frequent lag sometimes even for the whole system. Possibly the data + // corruption is an lmdb or filesystem bug. See + // https://github.com/Nheko-Reborn/nheko/issues/1355 + // https://github.com/Nheko-Reborn/nheko/issues/1303 + 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()));