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

[incubator-kie-issues#1625] Connection leak in persistence jdbc common #3784

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

elguardian
Copy link
Contributor

@yesamer yesamer changed the title Connection leak in persistence jdbc common [incubator-kie-issues#1625] Connection leak in persistence jdbc common Nov 28, 2024
ResultSet resultSet = close.nest(statement.executeQuery());
return StreamSupport.stream(new Spliterators.AbstractSpliterator<Record>(
Long.MAX_VALUE, Spliterator.ORDERED) {
List<Record> record = new ArrayList<>();
Copy link
Contributor

@fjtirado fjtirado Dec 13, 2024

Choose a reason for hiding this comment

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

Hi, the point of returning a stream was to not go through the whole list returned by the JDBC driver, avoiding a performance issue if the list of process instances is huge (notice that in the implementation being replaced you do not have to build the whole list of records )
Cant we fix the leak in closeablewrapper (whatever is it, maybe onclose is not invoked always?) without changing this part? I think we are going back to former implementaiton that provokes performance issues when the list of process instances grow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Connection leak in persistence jdbc common
4 participants