[QGIS-Developer] SQLite/GPKG database locked during canvas refresh... is it a feature?

Matthias Kuhn matthias at opengis.ch
Wed Oct 4 08:54:16 PDT 2017


Hi Luigi,

It sounds like a very crappy UX the way this is described.

The second way you describe sounds like a reasonable one to go.

However, most dataprovider handle this cleanly on a different level (if
you have an iterator open on a pg layer, it will keep delivering
features from the snapshot when the query was sent, and allow to modify
in parallel). So rendering shouldn't be stopped in any case, but only
when it's really required.

Actually there may also be other code besides rendering reading from
such a format while trying to save. So in the long run we'll need
something else.
Probably schedule a task that waits for any readers to be finished and
then saves once the lock is gone (and tell the user that the save has
been deferred).

Matthias

On 10/04/2017 04:46 PM, Luigi Pirelli wrote:
> Hi
> 
> the bug described in https://issues.qgis.org/issues/15498 IMHO is a
> feature instead of a regression... any opinion?
> 
> my rational is:
> 
> """Ok, it can be a regression, but IMHO the behaviour is correct in
> this way respect allowing to write during rendering.
> If layer is modified during rendering, theoretically rendering have to
> be invalidated. Stopping rendering is always possible with rendering
> checkbox in the bottom bar => the correct procedure would be:
> 1) stop rendering
> 2) save features
> 3) refresh
> 
> or
> 
> 1) during save => stop rendering
> 2) save edit
> 3) refresh
> 
> the above would be a new feature that is not strictly necessary
> because of manual workaround.
> 
> can it be considered a low priority issue, and more, can it be
> considered a fix instead of a regression"""
> 
> Luigi Pirelli
> 
> **************************************************************************************************
> * Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
> * LinkedIn: https://www.linkedin.com/in/luigipirelli
> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
> * GitHub: https://github.com/luipir
> * Mastering QGIS 2nd Edition:
> * https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition
> **************************************************************************************************
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 


More information about the QGIS-Developer mailing list