3dcitydb / importer-exporter

3D City Database client for high-performance import and export of 3D city model data
Apache License 2.0
126 stars 54 forks source link

Alternative hotfix export timeout issue #263

Closed clausnagel closed 2 years ago

clausnagel commented 2 years ago

This PR proposes an alterantive to #261 for fixing #257.

This hotfix purges the connection pool after every CityGML export. This prevents issues due to defect connections as the one reported in #257. A drawback of this approach is that the number of physical connections created by the pool increases especially when exporting in tiles, which undermines the idea of using a pool.

As identified by @yaozhihang in #261, it seems that the reason for #257 is the long where clause of the SQL query due to a polygon with a huge number of vertices encoded as WKT. Somehow a connection cannot be reused after sending this query to the database. I couldn't figure out how to identify such a defect connection and only remove it from the pool. This would be a better solution.

clausnagel commented 2 years ago

It seems that PR #264 also solves the issue #257 and thus makes this PR obsolete. @yaozhihang and @BWibo, can you please test and confirm?

clausnagel commented 2 years ago

I slightly changed the implementation. Now, only the connection opened by DBSplitter is physically closed and removed from the pool instead of purging all connections.

BWibo commented 2 years ago

I made a fresh build from #263 and tested again: