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

Internal references to local Locks taken using SharedData.getLock() are not cleaned up #2484

Closed
dano opened this issue Jun 4, 2018 · 5 comments
Milestone

Comments

@dano
Copy link
Contributor

dano commented Jun 4, 2018

Every time a unique lock name is taken via SharedData.getLock(...), it gets added to a Map inside of SharedDataImpl. Currently, entries added to this Map are never removed, even if all references to the lock have been released, and there are no pending waiters. This means the Map can grow infinitely if an application takes locks using generated names, rather than hard-coded ones. To avoid this, entries could be removed from the internal map at the point the lock is released, as long as there are no pending waiters.

@vietj vietj added this to the 3.6.0 milestone Jun 4, 2018
@tsegismont
Copy link
Contributor

@dano nice catch

@tsegismont tsegismont self-assigned this Jun 5, 2018
tsegismont added a commit to tsegismont/vert.x that referenced this issue Jun 14, 2018
…ng SharedData.getLock() are not cleaned up

Refactored local locks implementation to avoid keeping references to lock with no waiters.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
@dano
Copy link
Contributor Author

dano commented Jun 20, 2018

@vietj @tsegismont Thanks for the fix! Will this be backported to 3.5.3?

@vietj
Copy link
Member

vietj commented Jun 20, 2018

yes it should be

@tsegismont
Copy link
Contributor

@vietj will you take care of it?

@vietj
Copy link
Member

vietj commented Jun 20, 2018

sure

vietj pushed a commit that referenced this issue Jun 20, 2018
….getLock() are not cleaned up

Refactored local locks implementation to avoid keeping references to lock with no waiters.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
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

No branches or pull requests

3 participants