]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Use "PRAGMA synchronous = OFF" for dbutil.
authorDavid-Sarah Hopwood <david-sarah@jacaranda.org>
Thu, 6 Dec 2012 04:06:13 +0000 (04:06 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Tue, 8 Apr 2014 23:26:04 +0000 (00:26 +0100)
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
src/allmydata/util/dbutil.py

index c811fdfa93fdd9a1fe467338b4024cfe9f0184e4..fc12d4c0c32a4a64be09fdff8a2e5eef5d2c5e6e 100644 (file)
@@ -31,6 +31,14 @@ def get_db(dbfile, stderr=sys.stderr,
     # The default is unspecified according to <http://www.sqlite.org/foreignkeys.html#fk_enable>.
     c.execute("PRAGMA foreign_keys = ON;")
 
+    # This is necessary to pass tests for the time being, since using
+    # synchronous = NORMAL causes failures that are apparently due to a
+    # file descriptor leak, and the default synchronous = FULL causes the
+    # tests to time out. For discussion see
+    # https://tahoe-lafs.org/pipermail/tahoe-dev/2012-December/007877.html
+    #c.execute("PRAGMA journal_mode = WAL;")
+    c.execute("PRAGMA synchronous = OFF;")
+
     if must_create:
         c.executescript(schema)
         c.execute("INSERT INTO version (version) VALUES (?)", (target_version,))