]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Make backupdb use dbutil.
authorDaira Hopwood <david-sarah@jacaranda.org>
Mon, 15 Apr 2013 19:50:40 +0000 (20:50 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Fri, 10 Jul 2015 04:24:46 +0000 (05:24 +0100)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/storage/leasedb.py

index d64233d88a92fc42a2eaf3573757d992c73745f0..dbd72f90be3596fef2627d037c34e0aa36b04500 100644 (file)
@@ -119,8 +119,16 @@ class LeaseDB:
     STARTER_LEASE_DURATION = 2*MONTH
 
     def __init__(self, dbfile):
+        # synchronous = OFF is necessary for leasedb 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
+
         (self._sqlite,
-         self._db) = dbutil.get_db(dbfile, create_version=(LEASE_SCHEMA_V1, 1))
+         self._db) = dbutil.get_db(dbfile, create_version=(LEASE_SCHEMA_V1, 1),
+                                   # journal_mode="WAL",
+                                   synchronous="OFF")
         self._cursor = self._db.cursor()
         self.debug = False
         self.retained_history_entries = 10