about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2012-03-22T19·05+0100
committerLluís Batlle i Rossell <viric@viric.name>2012-03-22T19·05+0100
commit85799bf89ed2649d7f3e2298de0478c50a71776d (patch)
treea8cda184fa45f49410634fbc2e7a57781fea84f9 /src/libstore/local-store.cc
parent25de80e2b61208850c4a39d8ee44967ada8f040e (diff)
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/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc6
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);