修改cus日志输出范围,分布式锁新增添加新增失败可能是其他服务器抢占的逻辑控制
parent
2d4bce9513
commit
8e8b6376e6
|
@ -2080,6 +2080,7 @@ public class Util extends weaver.general.Util {
|
|||
appender.setAppend(true);
|
||||
appender.activateOptions();
|
||||
log.addAppender(appender);
|
||||
log.setAdditivity(false);
|
||||
log.setLevel(Level.INFO);
|
||||
/*
|
||||
boolean enableDebug = false;
|
||||
|
@ -2127,6 +2128,7 @@ public class Util extends weaver.general.Util {
|
|||
appender.setAppend(true);
|
||||
appender.activateOptions();
|
||||
cusLog.addAppender(appender);
|
||||
cusLog.setAdditivity(false);
|
||||
/*
|
||||
boolean enableDebug = false;
|
||||
try {
|
||||
|
|
|
@ -242,8 +242,14 @@ public class LockUtils {
|
|||
.build();
|
||||
LOCK_MAP.put(lockName, lockEntity);
|
||||
} else {
|
||||
LockPojo lockPojo = mapper.selectLock(lockName);
|
||||
if (Objects.isNull(lockPojo)) {
|
||||
// 锁失败
|
||||
retryLock(dataId, lockName, expirationTime, 0);
|
||||
} else {
|
||||
// 其他服务器抢占了锁资源
|
||||
return retryGetLock(lockName, overdueTime, lockPojo);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue