Merge pull request #2 from viric/master

Again, adding the sync option
This commit is contained in:
Eelco Dolstra 2012-04-23 03:29:03 -07:00
commit 6387830c3b

View file

@ -968,6 +968,12 @@ void LocalStore::registerValidPath(const ValidPathInfo & info)
void LocalStore::registerValidPaths(const ValidPathInfos & infos)
{
/* 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);