From: Daira Hopwood Date: Mon, 15 Apr 2013 19:50:40 +0000 (+0100) Subject: Make backupdb use dbutil. X-Git-Url: https://git.rkrishnan.org/?a=commitdiff_plain;h=a543e7ef76df45473c3f3ea38844e30d0ffb88af;p=tahoe-lafs%2Ftahoe-lafs.git Make backupdb use dbutil. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/storage/leasedb.py b/src/allmydata/storage/leasedb.py index d64233d8..dbd72f90 100644 --- a/src/allmydata/storage/leasedb.py +++ b/src/allmydata/storage/leasedb.py @@ -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