This is an automated email from the ASF dual-hosted git repository. morrysnow pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 1339eef33c [fix](statistics) remove statistical task multiple times in one loop cycle (#12741) 1339eef33c is described below commit 1339eef33cb6011dfba27a65d5d9dfd8da3863b4 Author: ElvinWei <zhengte....@outlook.com> AuthorDate: Mon Sep 19 19:28:51 2022 +0800 [fix](statistics) remove statistical task multiple times in one loop cycle (#12741) There is a problem with StatisticsTaskScheduler. The peek() method obtains a reference to the same task object, but the for-loop executes multiple removes. --- .../main/java/org/apache/doris/statistics/StatisticsTaskScheduler.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsTaskScheduler.java b/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsTaskScheduler.java index d2ab65705c..b46a4106b8 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsTaskScheduler.java +++ b/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsTaskScheduler.java @@ -68,7 +68,6 @@ public class StatisticsTaskScheduler extends MasterDaemon { Map<Long, List<Map<Long, Future<StatisticsTaskResult>>>> resultMap = Maps.newLinkedHashMap(); for (StatisticsTask task : tasks) { - queue.remove(); long jobId = task.getJobId(); if (checkJobIsValid(jobId)) { @@ -100,7 +99,7 @@ public class StatisticsTaskScheduler extends MasterDaemon { List<StatisticsTask> tasks = Lists.newArrayList(); int i = Config.cbo_concurrency_statistics_task_num; while (i > 0) { - StatisticsTask task = queue.peek(); + StatisticsTask task = queue.poll(); if (task == null) { break; } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org