[Qgis-developer] Proposed plan to fix issue with concurrent opening of OGR datasources (aka QGIS and MapInfo)
hugo.mercier at oslandia.com
Tue Mar 22 05:44:52 PDT 2016
On 22/03/2016 12:11, Even Rouault wrote:
>>> But you can also directly access the provider update methods without
>>> edit buffers and without startEditing / commitChanges.
>> Good point. I didn't think at that use case of direct access to the
>> provider API.
>>> ... but after all ... if I understood correctly your intents, for
>>> existing codes that use this direct provider access, update functions
>>> will reopen the source in write mode and they will always stay in that
>>> mode because the endEdit() method will never be called ?
>> One possibility would be also to go back to read-only mode with a timer.
>> For a write operation, outside of beginEdit() / endEdit(), that lead to
>> re-opening in update-mode, after X seconds without write activity, the
>> dataset would be re-opened in update mode.
> correction: "...would be re-opened in *read-only* mode"
I am not sure to like this timeout ... I prefer when the state of
objects does not silently change in background :)
Doing nothing would be ok: existing (plugin) codes would lock under
windows, which is already the case, and would have the opportunity to be
safer by calling endEdit().
More information about the Qgis-developer