[Qgis-user] GeoPackage deadlocks

Matthias Kuhn matthias at opengis.ch
Tue Oct 29 07:35:19 PDT 2019


On 10/25/19 7:04 PM, Even Rouault wrote:
> On vendredi 25 octobre 2019 17:10:40 CEST Matthias Kuhn wrote:
>> Hi all,
>>
>> We had the same experience in a project of ours. Multiple users with
>> read-only access to a gpkg on a (Windows) network share. The results
>> were freezes on unloading the layer (e.g. closing QGIS or opening
>> another project) on system A until system B would have closed the QGIS
>> layer there. The behavior seemed surprising to me and on first sight I'd
>> have put it more into the category "bug" rather than "feature".
>>
>> Good news, this behavior could be changed by switching the sqlite
>> journal mode to delete (environment variable OGR_SQLITE_JOURNAL=DELETE).
> Caution: WAL was enabled because DELETE (which is the default journal mode of
> SQLite) was causing locking issues, even in local file, single user, single
> QGIS application context. There might have been later changes in the OGR
> provider that makes it no longer needed, but this should be carefully checked.
> In particular if the test added in https://github.com/qgis/QGIS/commit/
> b6b8759efbeb833d0d3dbf6df008087701361ad3#diff-17fd782357fcfed115b06d24b4416bbdR92
> still pass in DELETE

FYI, after recent experiences with WAL disabled (in a different scenario 
without network involved), I don't think the situation has completely 
stabilized.

It seems we'll need to evaluate how to deal with multithreading to get 
things working properly.

Matthias



More information about the Qgis-user mailing list