You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by "jdeppe-pivotal (GitHub)" <gi...@apache.org> on 2020/03/18 13:43:23 UTC

[GitHub] [geode] jdeppe-pivotal commented on pull request #4819: GEODE-7885: Improve RedisLockService - fix synchronization and memory leak

The essence here is that you need to get a reference to the actual key in the map (if you don't it might get GC'd). Consider the first pass through all of this and I'm trying to lock key "ABC" and succeed. I have a reference to the key and all is good. If another thread comes to look for key "ABC" it will have a different 'key' object. So if we get the lock out of the map but don't also get the actual key then that lock might get GC'd if we don't retain a hard reference to its key.

[ Full content available at: https://github.com/apache/geode/pull/4819 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org