From 4d9fbf01b7fc9c0da8c2e267945d10af3837f161 Mon Sep 17 00:00:00 2001 From: drebs Date: Fri, 1 Sep 2017 09:50:11 -0300 Subject: [bug] ensure the number of threads in blobs thread pool The number of threads in the blobs databae thread pool can't be smaller than the number of attemps to write concurrently to the database, otherwise different kinds of concurrency problems may arise. By setting the minimum and maximum number of threads to the same number, we make sure there will always be that number of available threads for interaction with the blobs db. --- src/leap/soledad/client/_db/blobs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/leap/soledad') diff --git a/src/leap/soledad/client/_db/blobs.py b/src/leap/soledad/client/_db/blobs.py index 7015ae5b..ada72475 100644 --- a/src/leap/soledad/client/_db/blobs.py +++ b/src/leap/soledad/client/_db/blobs.py @@ -425,7 +425,7 @@ class SQLiteBlobBackend(object): self.dbpool = ConnectionPool( backend, self.path, check_same_thread=False, timeout=5, - cp_openfun=openfun, cp_min=1, cp_max=2, cp_name='blob_pool') + cp_openfun=openfun, cp_min=2, cp_max=2, cp_name='blob_pool') def close(self): from twisted._threads import AlreadyQuit -- cgit v1.2.3