1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-12 12:01:05 +01:00

Add fsync-store-paths option

- Add recursiveSync function to flush a directory tree to disk

- Add AutoCloseFD::startFsync to initiate an asynchronous fsync
  without waiting for the result

- Initiate an asynchronous fsync while extracting NAR files

- Implement the fsync-store-paths option in LocalStore
This commit is contained in:
squalus 2022-10-04 00:47:43 -07:00
parent 1437582ccd
commit 5987fb7459
7 changed files with 102 additions and 10 deletions

View file

@ -234,6 +234,13 @@ public:
default is `true`.
)"};
Setting<bool> fsyncStorePaths{this, false, "fsync-store-paths",
R"(
"Whether to call `fsync()` on store paths before registering them, to
flush them to disk. This improves robustness in case of system crashes,
but reduces performance. The default is `false`.
)"};
Setting<bool> useSQLiteWAL{this, !isWSL1(), "use-sqlite-wal",
"Whether SQLite should use WAL mode."};