From: Daira Hopwood Date: Mon, 15 Apr 2013 19:50:40 +0000 (+0100) Subject: Use "PRAGMA synchronous = OFF" for leasedb. X-Git-Url: https://git.rkrishnan.org/?a=commitdiff_plain;h=d1a3dee3324756ed1d163030f7c864430e5bedcc;p=tahoe-lafs%2Ftahoe-lafs.git Use "PRAGMA synchronous = OFF" for leasedb. 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