fix: 2.0.0
1. 修复回滚主键冲突问题
This commit is contained in:
parent
10ec18adae
commit
846eb8693f
@ -89,6 +89,7 @@ public class RetryDeadLetterServiceImpl implements RetryDeadLetterService {
|
||||
retryTask.setNextTriggerAt(WaitStrategies.randomWait(1, TimeUnit.SECONDS, 60, TimeUnit.SECONDS).computeRetryTime(null));
|
||||
retryTask.setCreateDt(LocalDateTime.now());
|
||||
retryTask.setUpdateDt(LocalDateTime.now());
|
||||
retryTask.setId(null);
|
||||
RequestDataHelper.setPartition(groupName);
|
||||
Assert.isTrue(1 == retryTaskMapper.insert(retryTask), () -> new EasyRetryServerException("新增重试任务失败"));
|
||||
|
||||
|
@ -164,7 +164,7 @@ public class ServerNodeBalance implements Lifecycle, Runnable {
|
||||
try {
|
||||
TimeUnit.SECONDS.sleep(INITIAL_DELAY);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
|
||||
while (!Thread.currentThread().isInterrupted()) {
|
||||
@ -234,13 +234,15 @@ public class ServerNodeBalance implements Lifecycle, Runnable {
|
||||
|
||||
} catch (InterruptedException e) {
|
||||
LogUtils.error(log, "check balance interrupt");
|
||||
Thread.currentThread().interrupt();
|
||||
} catch (Exception e) {
|
||||
LogUtils.error(log, "check balance error", e);
|
||||
} finally {
|
||||
try {
|
||||
TimeUnit.SECONDS.sleep(1);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
LogUtils.error(log, "check balance interrupt");
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user