forked from spring-projects/spring-integration
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
INT-3667: Fix
RedisLockRegistry
memory leak
JIRA: https://jira.spring.io/browse/INT-3667 * fix `RedisLockRegistry.tryLock` memory leaks using 2 different thread local internal storages: hard references for locked locks and weak references (optional) for others, weak references are used for lock obtaining optimization - thread will get same `RedisLock` object for certain key before locking and after unlocking (if variable still exists) * add `RedisLockRegistry.useWeakReferences` property for enable thread local weak references storage for unlocked locks, disabled by default * fix `RedisLockRegistry$RedisLock.obtainLock` improper expire time update (expire time was updated on every attempt to get lock) * update `RedisLockRegistry` tests
- Loading branch information
1 parent
f686c21
commit efef65c
Showing
3 changed files
with
238 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.