Hi,

playing lately with more complex scenarios with ogr2ogr, that time involving both a lot of features and multiple layers being converted at once to GeoPackage, I've seen error messages being emitted during conversions and some slowness due to SQLite3 self-locking itself for periods of a few seconds. This is still due to the multithreaded RTree implementation. I didn't notice data corruption though, but I won't swear it couldn't happen.

My conclusion was that is isn't safe to enable it when multiple layers are created in a GeoPackage file. I've thus disabled it in such scenarios per https://github.com/OSGeo/gdal/pull/6959. So in the meantime setting the OGR_GPKG_ALLOW_THREADED_RTREE environment variable/configuration option to NO is still a recommended workaround (if you write multiple layers in the same GeoPackage file). I'll probably issue a 3.6.2 release at the beginning of next year when everyone is back from their break.

Even

Le 13/12/2022 à 16:18, Even Rouault via gdal-dev a écrit :
Hi,

https://github.com/qgis/QGIS/issues/51188 has been brought to my attention. The issue is that the new background building of the RTree of GeoPackage files introduced in 3.6.0 didn't work well with committing transactions in between, which is easily triggered by ogr2ogr. All features were inserted but with default settings ~ 10% of them lacked an entry in the spatial index, which can be enough to break interactive display and workflows relying on spatial filtering. When using ogr2ogr, I believe the issue can only be seen when creating layers with more than 100 000 features, since that's the default value for the interval at which transactions are committed.

I've a fix ready in https://github.com/OSGeo/gdal/pull/6911. The fix itself is a simple two-liner: https://github.com/OSGeo/gdal/pull/6911/commits/3f5f6225fe82e0c2e0241e4f66bfb861cdf4fe9d

Given the status of GeoPackage being the default format for QGIS, I believe this is a severe enough issue to warrant an advanced 3.6.1 release, and an official retraction of 3.6.0.

Thoughts ?

Even

--
http://www.spatialys.com
My software is free, but my time generally not.

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to