-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OGR provider: only enable journal_mode = wal when editing. requires G…
…DAL >= 3.4.2 (fixes qgis#23991) This requires the NOLOCK open option of the GPKG driver added per OSGeo/gdal#5207 For earlier GDAL version, previous behaviour is kept. With GDAL >= 3.4.2, when creating a QgsOgrProvider object, we first open it in update mode without forcing WAL, to get the appropriate capabilities, close it, and re-open it in read-only mode with the NOLOCK=YES open option. This option will only be honoured if the file wasn't already in WAL mode. When editing a layer, the file is re-opened in update mode and with enabling WAL to avoid blocking between readers and writers. When closing a file, journal mode is attempted to be reset to DELETE as before. I've verified that test_provider_ogr_gpkg.py and test_provider_ogr.py pass locally with GDAL master + OSGeo/gdal#5207
- Loading branch information
Showing
5 changed files
with
110 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters