Repository navigation
Export SQL injection fix - #2514
Conversation
… to slightly adapt SQL injection test
There was a problem hiding this comment.
Nice work!
Did some manual exports, everything remains functional and performant (with 3 different attributes on 2 different assets in total ~1 million datapoints). Performance seems unaffected. This will conflict with #2020.
|
I'm seeing some potential performance degradation at 10mil datapoints. I'll investigate again later today. |
|
Did some more testing with 10mil datapoints. Single exports take (on my system) instead of ~15s now ~19s. With 3 active streams from ~16-17s to ~19-24s (though this varies quite a lot). The time before the first chunk is received by the client increased quite significantly, likely due to the temp table and added joins. There are possible optimizations here, but let's explore those separately we would need to increase the request timeout on the frontend anyways when going past a few million datapoints. |
This currently fixes the SQL injection possibility but makes the code a bit more complex.
I'd like to take a look at PostgreSQL JDBC driver CopyManager class to further improve this code, this will be addressed in a separate issue.