# HG changeset patch # User Pierre-Yves David # Date 1535321886 -7200 # Node ID e47cdbb48ac7e694cd155a59133c6a0225eedc19 # Parent 518e042849215f42ec9b87af87568c3f76d335e8 sqlcache: passe better connection option These new options should help with handling transaction consistency and database access on high load. diff -r 518e04284921 -r e47cdbb48ac7 hgext3rd/evolve/obsdiscovery.py --- a/hgext3rd/evolve/obsdiscovery.py Sun Aug 26 20:55:26 2018 +0200 +++ b/hgext3rd/evolve/obsdiscovery.py Mon Aug 27 00:18:06 2018 +0200 @@ -529,7 +529,7 @@ util.makedirs(self._vfs.dirname(self._path)) except OSError: return None - con = sqlite3.connect(self._path) + con = sqlite3.connect(self._path, timeout=30, isolation_level="IMMEDIATE") con.text_factory = str return con diff -r 518e04284921 -r e47cdbb48ac7 hgext3rd/evolve/stablerangecache.py --- a/hgext3rd/evolve/stablerangecache.py Sun Aug 26 20:55:26 2018 +0200 +++ b/hgext3rd/evolve/stablerangecache.py Mon Aug 27 00:18:06 2018 +0200 @@ -193,7 +193,7 @@ util.makedirs(self._vfs.dirname(self._path)) except OSError: return None - con = sqlite3.connect(self._path) + con = sqlite3.connect(self._path, timeout=30, isolation_level="IMMEDIATE") con.text_factory = str return con