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.
This commit is contained in:
Lluís Batlle i Rossell 2012-03-22 20:05:54 +01:00
parent 25de80e2b6
commit 85799bf89e
1 changed files with 5 additions and 1 deletions

View File

@ -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);