You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2023/04/06 04:03:58 UTC

[iotdb] branch timeoutQueue created (now 1b93934065)

This is an automated email from the ASF dual-hosted git repository.

xiangweiwei pushed a change to branch timeoutQueue
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 1b93934065 add last task to timeoutQueue

This branch includes the following new commits:

     new 1b93934065 add last task to timeoutQueue

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: add last task to timeoutQueue

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiangweiwei pushed a commit to branch timeoutQueue
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 1b93934065dbee6af203a37b0d46678cf20d7a4e
Author: Alima777 <wx...@gmail.com>
AuthorDate: Thu Apr 6 12:03:28 2023 +0800

    add last task to timeoutQueue
---
 .../apache/iotdb/db/mpp/execution/schedule/DriverScheduler.java   | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/schedule/DriverScheduler.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/schedule/DriverScheduler.java
index 6cd893f441..90bf9b2e98 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/schedule/DriverScheduler.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/schedule/DriverScheduler.java
@@ -216,6 +216,7 @@ public class DriverScheduler implements IDriverScheduler, IService {
     for (DriverTask task : submittedTasks) {
       registerTaskToQueryMap(queryId, task);
     }
+    timeoutQueue.push(submittedTasks.get(submittedTasks.size() - 1));
     for (DriverTask task : submittedTasks) {
       submitTaskToReadyQueue(task);
     }
@@ -225,12 +226,7 @@ public class DriverScheduler implements IDriverScheduler, IService {
     // If query has not been registered by other fragment instances,
     // add the first task as timeout checking task to timeoutQueue.
     queryMap
-        .computeIfAbsent(
-            queryId,
-            v -> {
-              timeoutQueue.push(driverTask);
-              return new ConcurrentHashMap<>();
-            })
+        .computeIfAbsent(queryId, k -> new ConcurrentHashMap<>())
         .computeIfAbsent(
             driverTask.getDriverTaskId().getFragmentInstanceId(),
             v -> Collections.synchronizedSet(new HashSet<>()))