赞
踩
Redisson做分布式锁是目前比较流行的方式,但是在使用的过程中遇到一些坑:
报异常:
2022-05-07 10:10:36.005 INFO 67300 --- [ main] c.y.redisson.utils.DistributedRedisLock : lock:true
2022-05-07 10:10:36.011 INFO 67300 --- [ main] c.y.redisson.utils.DistributedRedisLock : lock.isHeldByCurrentThread: false
2022-05-07 10:10:36.039 ERROR 67300 --- [ main] c.y.redisson.utils.DistributedRedisLock : DistributedRedisLock unlock [yuange] Exception:
java.lang.IllegalMonitorStateException: attempt to unlock lock, not locked by current thread by node id: 51f450d1-f832-4950-8e78-aec9a7484b8e thread-id: 1
at org.redisson.RedissonBaseLock.lambda$unlockAsync$1(RedissonBaseLock.java:316) ~[redisson-3.16.8.jar:3.16.8]
at java.util.concurrent.CompletableFuture.uniHandle(Com
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。