redisson没有释放锁,造成死锁
boolean isLock = redissonUtil.tryLock(lockKey, TimeUnit.SECONDS, 3, -1);
try {
//result = multiLock.tryLock(3, TimeUnit.SECONDS);
if (isLock) {
log.info("method monitAffirmOrder agtId:{} 线程ID:{} 取到锁--时间:{}", agtId, Thread.currentThread().getId(), DateUtil.parseDateToStr(new Date(), DateUtil.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI_SS));
AgtOrder agtOrder = agtOrderService.getAgtOrder(model.getAgtOrderNo());
MchOrder mchOrder = mchOrderService.getMchOrder(agtOrder.getMchOrderNo());
//agtOrder.setOperator(getOperator());
agtOrder.setOperator("监控确认");
agtOrder.setRemark(model.getRemark());
saResult = iorderService.orderCallback20220624(agtOrder, mchOrder, agtConfList);
if (200 == saResult.getCode() && null != agtOrder.getNotifyStatus() && agtOrder.getNotifyStatus() != 1) {
mchIpConfService.updateMchIpOrder(mchOrder);
agtAccountService.processAgtAcByAccId(agtOrder.getAccId());// 码商收款成功之后,对收款账户进行处理
SaResult res = orderService.autoCallback(agtOrder, mchOrder);
if (200 == res.getCode()) {
return SaResult.ok();
} else {
return res;
}
}
} else {
return SaResult.get(3457, "服务繁忙, 稍后再试", "服务繁忙, 稍后再试");
}
} catch (Exception e) {
saResult = SaResult.get(3457, "affirmOrder error", e);
log.error("affirmOrder error ", e);
} finally {
if (isLock) {
log.info("method monitAffirmOrder agtId:{} 线程ID:{} 释放锁--时间:{}", agtId, Thread.currentThread().getId(), DateUtil.parseDateToStr(new Date(), DateUtil.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI_SS));
redissonUtil.unlock(lockKey);
log.info("method monitAffirmOrder agtId:{} 线程ID:{} 释放锁成功--时间:{}", agtId, Thread.currentThread().getId(), DateUtil.parseDateToStr(new Date(), DateUtil.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI_SS));
}
}
现在这个key一直在redis自动续命。
该key最后一次获取锁日志
后续的就没有释放锁的日志,也没有异常日志