diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-11-07 21:11:59 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-11-07 21:11:59 +0000 |
commit | c0b706213dad330bd51607ff73059c87f0ec5b93 (patch) | |
tree | 76a6db26221e8ce02cd3056c299927ccab386752 /src/libstore/local-store.cc | |
parent | a6a3f3a8c26fdd6900880c13e924e6879d6c714c (diff) |
* Boldly make SQLite WAL mode the default again. Hopefully the
intermittent problems are gone by now. WAL mode is preferrable
because it does way fewer fsyncs.
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r-- | src/libstore/local-store.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 702ff67e7..06cadcb0f 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -327,10 +327,9 @@ void LocalStore::openDB(bool create) if (sqlite3_exec(db, ("pragma synchronous = " + syncMode + ";").c_str(), 0, 0, 0) != SQLITE_OK) throwSQLiteError(db, "setting synchronous mode"); - /* Set the SQLite journal mode. WAL mode is fastest, but doesn't - seem entirely stable at the moment (Oct. 2010). Thus, use - truncate mode by default. */ - string mode = queryBoolSetting("use-sqlite-wal", false) ? "wal" : "truncate"; + /* Set the SQLite journal mode. WAL mode is fastest, so it's the + default. */ + string mode = queryBoolSetting("use-sqlite-wal", true) ? "wal" : "truncate"; string prevMode; { SQLiteStmt stmt; |