about summary refs log tree commit diff
path: root/scripts/download-using-manifests.pl.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-07-13T14·05+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-07-13T14·05+0000
commite649f3168bb03053c8201489ca52f9077c0d8b17 (patch)
tree41060896ca6194aebc83277507cac532a3558585 /scripts/download-using-manifests.pl.in
parent0a623a10c7e89a80b6dc74445a0ae6240f65723e (diff)
* Fix concurrency issues in download-using-manifests' handling of the
  SQLite manifest cache.  The DBI AutoCommit feature caused every
  process to have an active transaction at all times, which could
  indefinitely block processes wanting to update the manifest cache.

* Disable fsync() in the manifest cache because we don't need
  integrity (the cache can always be recreated if it gets corrupted).

Diffstat (limited to '')
-rw-r--r--scripts/download-using-manifests.pl.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/download-using-manifests.pl.in b/scripts/download-using-manifests.pl.in
index a6588aa9acb7..ca4d97b51aa6 100644
--- a/scripts/download-using-manifests.pl.in
+++ b/scripts/download-using-manifests.pl.in
@@ -267,6 +267,12 @@ my @path = computeSmallestDownload $targetPath;
 die "don't know how to produce $targetPath\n" if scalar @path == 0;
 
 
+# We don't need the manifest anymore, so close it as an optimisation:
+# if we still have SQLite locks blocking other processes (we
+# shouldn't), this gets rid of them.
+$dbh->disconnect;
+
+
 # Traverse the shortest path, perform the actions described by the
 # edges.
 my $curStep = 1;