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

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

Merged
merged 4 commits into from
Mar 14, 2022

Conversation

rouault
Copy link
Contributor

@rouault rouault commented Feb 11, 2022

Backport of PR #47098

@rouault rouault added Backport Is a backport of another pull request Bug Either a bug report, or a bug fix. Let's hope for the latter! labels Feb 11, 2022
@github-actions github-actions bot added this to the 3.24.0 milestone Feb 11, 2022
@nyalldawson nyalldawson modified the milestones: 3.24.0, 3.22.6 Feb 20, 2022
@nyalldawson
Copy link
Collaborator

@rouault can you rebase this on queued_ltr_backports again?

…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
Copy link
Contributor Author

rouault commented Feb 21, 2022

can you rebase this on queued_ltr_backports again?

done

@github-actions
Copy link

github-actions bot commented Mar 8, 2022

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Mar 8, 2022
@rouault
Copy link
Contributor Author

rouault commented Mar 8, 2022

keep alive

@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport Is a backport of another pull request Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants