Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent resource leak by closing the PreparedStatement #390

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

lburja
Copy link
Contributor

@lburja lburja commented Oct 7, 2024

fix(jdbc): avoid resource leak when using batching, by closing the PreparedStatement

close #321

@loicmathieu loicmathieu self-requested a review October 7, 2024 14:35
Copy link
Member

@loicmathieu loicmathieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good to me.

Did you tested it with your file that contains 1.6M rows ?

@lburja
Copy link
Contributor Author

lburja commented Oct 7, 2024

Yes I did. I modified locally the test BatchTest::namedInsert to insert 2.000.000 rows into a table instead of 5.

As expected, the test fails:
image

Then, I applied the fix, and now the test passes:
image

@loicmathieu
Copy link
Member

@lburja great! Thanks for the confirmation

@loicmathieu loicmathieu merged commit 504c457 into kestra-io:master Oct 8, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Task 'io.kestra.plugin.jdbc.oracle.Batch' fails with big number of rows (does not properly close cursors)
2 participants