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

resetStreamer() does not close the underlying Entity Manager #341

Closed
julgus opened this issue Jun 15, 2023 · 1 comment
Closed

resetStreamer() does not close the underlying Entity Manager #341

julgus opened this issue Jun 15, 2023 · 1 comment
Assignees
Labels
bug Something isn't working
Projects
Milestone

Comments

@julgus
Copy link
Member

julgus commented Jun 15, 2023

Describe the bug
Whenever resetting a Streamer using jpaStreamer.resetStreamer() the underlying Entity Manager is left open. This can cause memory leaks, see #147.

Expected behavior
The Entity Manager associated with the removed Streamer should be closed, as we are no longer holding a reference to it. This also prevents JPAStreamer from properly closing these Entity Managers upon jpaStreamer.close() as they are no longer in the cache, but are still open.

Actual behavior
Any Streamer that we cache will create an Entity Manager that stays open if the Streamer is removed from the cache through a call to jpaStreamer.resetStreamer().

JPAStreamer version
e.g. JPAStreamer 3.0.1

@julgus julgus added the bug Something isn't working label Jun 15, 2023
@julgus julgus self-assigned this Jun 15, 2023
@julgus julgus added this to the 3.0.2 milestone Jun 15, 2023
@julgus julgus added this to In Progress in 3.0.4 Jun 15, 2023
@julgus julgus moved this from In Progress to Done in 3.0.4 Jun 19, 2023
@julgus
Copy link
Member Author

julgus commented Jun 19, 2023

Following discussions in #147, we decided to remove the cache altogether. Therefore resetStreamer() will be deprecated from 3.0.2.

@julgus julgus closed this as completed Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
3.0.4
Done
Development

No branches or pull requests

1 participant