You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refine unlocking by checking whether the lock was actually applied.
Reduce allocations, refine test assertions to check for concurrency.
See #1686
Original pull request: #2879
Refine unlocking by checking whether the lock was actually applied.
Reduce allocations, refine test assertions to check for concurrency.
See #1686
Original pull request: #2879
joongsoo opened DATAREDIS-1117 and commented
If using
RedisCacheWriter.lockingCacheWriter()
, it is not atomic.In
DefaultRedisCacheWriter
execute
method wait for unlock. and execute target callable.When the lock is released, many waiting threads possible access to callable.
But
doLock
method is not guarantee to acquire lock. because it does not check acquired lock.So multiple threads can run the task at the same time.
So the
doLock
method must be improved to acquired a lockAffects: 2.2.5 (Moore SR5)
Reference URL: https://github.com/spring-projects/spring-data-redis/blob/master/src/main/java/org/springframework/data/redis/cache/DefaultRedisCacheWriter.java
Referenced from: pull request #518
The text was updated successfully, but these errors were encountered: