未验证 提交 4f09f734 编写于 作者: 许雪里's avatar 许雪里 提交者: GitHub

Merge pull request #852 from KBCode/patch-1

Update JobTriggerPoolHelper.java
......@@ -50,7 +50,7 @@ public class JobTriggerPoolHelper {
// job timeout count
private volatile long minTim = System.currentTimeMillis()/60000; // ms > min
private volatile Map<Integer, AtomicInteger> jobTimeoutCountMap = new ConcurrentHashMap<>();
private volatile ConcurrentHashMap<Integer, AtomicInteger> jobTimeoutCountMap = new ConcurrentHashMap<>();
/**
......@@ -89,7 +89,7 @@ public class JobTriggerPoolHelper {
// incr timeout-count-map
long cost = System.currentTimeMillis()-start;
if (cost > 500) { // ob-timeout threshold 500ms
AtomicInteger timeoutCount = jobTimeoutCountMap.put(jobId, new AtomicInteger(1));
AtomicInteger timeoutCount = jobTimeoutCountMap.putIfAbsent(jobId, new AtomicInteger(1));
if (timeoutCount != null) {
timeoutCount.incrementAndGet();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册