We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.7.2
解锁异常错误: java.lang.IllegalMonitorStateException: attempt to unlock lock, not locked by current thread by node id: dd15cf0c-19ad-43dc-8297-7d00a00a7c86 thread-id: 90 建议修复 public void unlock(String lockName) { try { RLock lock = redissonClient.getLock(lockName); if (lock.isLocked() && lock.isHeldByCurrentThread()) { lock.unlock(); } } catch (Exception e) { log.error("解锁异常,lockName=" + lockName, e); } }
java.lang.IllegalMonitorStateException: attempt to unlock lock, not locked by current thread by node id: dd15cf0c-19ad-43dc-8297-7d00a00a7c86 thread-id: 90 public void unlock(String lockName) { try { redissonClient.getLock(lockName).unlock(); } catch (Exception e) { log.error("解锁异常,lockName=" + lockName, e); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
版本号:
3.7.2
问题描述:
解锁异常错误:
java.lang.IllegalMonitorStateException: attempt to unlock lock, not locked by current thread by node id: dd15cf0c-19ad-43dc-8297-7d00a00a7c86 thread-id: 90
建议修复
public void unlock(String lockName) {
try {
RLock lock = redissonClient.getLock(lockName);
if (lock.isLocked() && lock.isHeldByCurrentThread()) {
lock.unlock();
}
} catch (Exception e) {
log.error("解锁异常,lockName=" + lockName, e);
}
}
错误截图:
java.lang.IllegalMonitorStateException: attempt to unlock lock, not locked by current thread by node id: dd15cf0c-19ad-43dc-8297-7d00a00a7c86 thread-id: 90
public void unlock(String lockName) {
try {
redissonClient.getLock(lockName).unlock();
} catch (Exception e) {
log.error("解锁异常,lockName=" + lockName, e);
}
}
友情提示:
The text was updated successfully, but these errors were encountered: