-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Milestone
Comments
@dano nice catch |
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>
@vietj @tsegismont Thanks for the fix! Will this be backported to 3.5.3? |
yes it should be |
@vietj will you take care of it? |
sure |
19 tasks
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
Every time a unique lock name is taken via
SharedData.getLock(...)
, it gets added to a Map inside ofSharedDataImpl
. 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.The text was updated successfully, but these errors were encountered: