Bug report #15754
editing several layers in geopackage - database is locked
|Affected QGIS version:||2.18.0||Regression?:||No|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||23676|
In a QGIS project with several layers from a single geopackage database, the following problem frequently occurs:
Switch layer to editing mode, do geometry edits, save edits, deactivate layer editing mode.
Switch second layer to editing mode, do geometry edits, try to save edits -> Database provider errors (OGR) e.g. "failed to execute insert: database is locked".
After closing QGIS and reopening the same project, the second layer can be edited and the edits are successfully saved, but the problem occurs again when another layer from the same geopackage is edited.
Maybe this problem is related to the one in #15351.
#1 Updated by Even Rouault over 4 years ago
- File test.gpkg added
I tried with master on Linux with the attached DB and couldn't reproduce the issue (I'm attaching the simple DB I used for reference). Normally locking issues should have been fixed in 2.18.0 per #0497e4a454c7ad689a0fc7b767208f95d53266b0. Can you have provide a reproducable procedure + test DB ?
#2 Updated by Jochen Huber over 4 years ago
A test with the DB located on a local drive did NOT show the problem, prompting further investigation:
- Network share on Windows Server 2008 R2 Standard, Access via domain-integrated DFS (Distributed File System): Problem occurs
- Network share on Windows Server 2008 R2 Standard, direct access to server: Works fine
- Network share on Windows Server 2012 R2 Standard (direct access), Windows 7 Professional SP 1, QNAP NAS or Western Digital MyBook Live: Works fine
So this seems to be a problem which only occurs when accessing a network share via DFS (which is the standard case in our company). Interestingly, there is no problem with Spatialite DBs, so there seems to be a difference in how QGIS accesses Geopackage DBs vs. Spatialite DBs.