Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OGR provider: only enable journal_mode = wal when editing. requires GDAL >= 3.4.2 (fixes #23991) #47098

Merged
merged 4 commits into from Feb 1, 2022

Commits on Jan 31, 2022

  1. Configuration menu
    Copy the full SHA
    e89aab4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7578c41 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b8ad0fc View commit details
    Browse the repository at this point in the history
  4. 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
    rouault committed Jan 31, 2022
    Configuration menu
    Copy the full SHA
    f280714 View commit details
    Browse the repository at this point in the history