diff options
author | Lluís Batlle i Rossell <viric@viric.name> | 2012-03-22 20:05:54 +0100 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@viric.name> | 2012-03-22 20:05:54 +0100 |
commit | 85799bf89ed2649d7f3e2298de0478c50a71776d (patch) | |
tree | a8cda184fa45f49410634fbc2e7a57781fea84f9 /src | |
parent | 25de80e2b61208850c4a39d8ee44967ada8f040e (diff) | |
download | guix-85799bf89ed2649d7f3e2298de0478c50a71776d.tar.gz |
Fixing the default of sync-before-registering
Setting 'false' as default, as suggested by Eelco. I also added a comment about the setting in the code.
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/local-store.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 950e6e7608..ca541e1cce 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -968,8 +968,12 @@ void LocalStore::registerValidPath(const ValidPathInfo & info) void LocalStore::registerValidPaths(const ValidPathInfos & infos) { - if (queryBoolSetting("sync-before-registering", true)) + /* sqlite will fsync by default, but the new valid paths may not be fsync-ed. + * So some may want to fsync them before registering the validity, at the + * expense of some speed of the path registering operation. */ + if (queryBoolSetting("sync-before-registering", false)) sync(); + while (1) { try { SQLiteTxn txn(db); |