From b2ff5bedc8e12f3af9950ecea8dc27487597bff4 Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Tue, 11 Aug 2020 16:41:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AE=E8=AE=AD=E8=B7=AF=E7=94=B1=E7=AD=96?= =?UTF-8?q?=E7=95=A5=E4=BC=98=E5=8C=96=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=B0=8F?= =?UTF-8?q?=E6=A6=82=E7=8E=87=E4=B8=8B=E5=B9=B6=E5=8F=91=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/XXL-JOB官方文档.md | 3 ++- .../xxl/job/admin/core/route/strategy/ExecutorRouteRound.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index 5e4d40a2..a26c3d13 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -1996,7 +1996,8 @@ data: post-data - 6.2、日志组件逻辑调整:日志组件改为通过 XxlJobContent 获取任务上下文并匹配写入对应日志文件; - 7、页面redirect跳转后https变为http问题修复; - 8、调度线程连接池优化,修复连接有效性校验超时问题。 -- 9、[规划中]任务触发参数优化:支持选择 "Cron触发"、"固定间隔时间触发"、"指定时间点触发"、"不选择" 等; +- 9、轮训路由策略优化,修复小概率下并发问题; +- 10、[规划中]任务触发参数优化:支持选择 "Cron触发"、"固定间隔时间触发"、"指定时间点触发"、"不选择" 等; ### 7.32 版本 v2.3.0 Release Notes[规划中] - 1、[规划中]多数据库支持,DAO层通过JPA实现,不限制数据库类型; diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/route/strategy/ExecutorRouteRound.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/route/strategy/ExecutorRouteRound.java index 12a2f2a1..d0ea2baa 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/route/strategy/ExecutorRouteRound.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/route/strategy/ExecutorRouteRound.java @@ -26,8 +26,8 @@ public class ExecutorRouteRound extends ExecutorRouter { } AtomicInteger count = routeCountEachJob.get(jobId); - // 初始化时主动Random一次,缓解首次压力 if (count == null || count.get() > 1000000) { + // 初始化时主动Random一次,缓解首次压力 count = new AtomicInteger(new Random().nextInt(100)); } else { // count++