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
i met a problem, i have about 200 instances try get a distribute lock by use redisson client,
and one instances will occur CancellationException after running a period time, and can not recover.
java.util.concurrent.CancellationException
at java.base/java.util.concurrent.CompletableFuture.cancel(CompletableFuture.java:2468)
at org.redisson.RedissonLock.tryLock(RedissonLock.java:235)
code as below:
`
RLock lock;
try {
lock = redissonService.getRedissonClient().getLock(LEASE_COORDINATOR_LOCK_KEY);
if (!lock.tryLock(3_000, 60_000, TimeUnit.MILLISECONDS)) {
//log something
return;
}
//do something....
} catch (InterruptedException e) {
//log something
} catch (Exception e) {
//log something
} finally {
//here ignore unlock to ensure execute only once in specific period time
//lock.unlock();
}`
The text was updated successfully, but these errors were encountered:
I'm having the same issue that @yinyansheng reported after upgrading from Redisson client 3.16.1 to version 3.17.6
java.util.concurrent.CancellationException
at java.base/java.util.concurrent.CompletableFuture.cancel(CompletableFuture.java:2396)
at org.redisson.RedissonLock.tryLock(RedissonLock.java:235)
The issue is happening with a sample code similar to the one posted by @yinyansheng, when calling the tryLock() method.
hello,
i met a problem, i have about 200 instances try get a distribute lock by use redisson client,
and one instances will occur CancellationException after running a period time, and can not recover.
version: 3.17.6
server: aws elasticahe redis cluster
java.util.concurrent.CancellationException
at java.base/java.util.concurrent.CompletableFuture.cancel(CompletableFuture.java:2468)
at org.redisson.RedissonLock.tryLock(RedissonLock.java:235)
code as below:
`
The text was updated successfully, but these errors were encountered: