While reviewing my batch insert pull request [1], Andrea Aime did a couple of coments [2] [3] that calls for a broader discussion.
In summary, I'm trying to improve the GeoTools performance when inserting a lot of features in the DB. For that, I need to group the insertions together in order to leverage batch inserts. This is done by adding a buffer in JDBCInsertFeatureWriter that is flushed every 100 inserts and when the writer is closed. This can brake the code using it: - If the code closes the connection before the writer itgets an exception. - If the code forgets to close the writer and the connection, the features will be inserted when the GC wakes up. To me there are several solutions to that: - Put a warning in the release notes and let them fix the code. - Have the default buffer size set to 1 and have a parameter somewhere (where?) to change it. What's your take? Thanks. [1] https://github.com/geotools/geotools/pull/1009 [2] https://github.com/geotools/geotools/pull/1009#discussion_r42947268 [3] https://github.com/geotools/geotools/pull/1009#issuecomment-150946096
------------------------------------------------------------------------------
_______________________________________________ GeoTools-Devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
