This is an automated email from the ASF dual-hosted git repository.
xingtanzjr pushed a commit to branch xingtanzjr/query_retry_redirect
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to
refs/heads/xingtanzjr/query_retry_redirect by this push:
new 2836a00d17 fix bug in terminator
2836a00d17 is described below
commit 2836a00d1799b81bfae07d7fcf028b755eea6915
Author: Jinrui.Zhang <[email protected]>
AuthorDate: Wed Aug 17 10:56:19 2022 +0800
fix bug in terminator
---
.../apache/iotdb/db/mpp/plan/scheduler/SimpleQueryTerminator.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/SimpleQueryTerminator.java
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/SimpleQueryTerminator.java
index f452600ad1..1bfd27438f 100644
---
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/SimpleQueryTerminator.java
+++
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/SimpleQueryTerminator.java
@@ -75,6 +75,11 @@ public class SimpleQueryTerminator implements
IQueryTerminator {
@Override
public Future<Boolean> terminate() {
+ // For the failure dispatch, the termination should not be triggered
because of connection issue
+ this.relatedHost =
+ this.relatedHost.stream()
+ .filter(endPoint ->
!queryContext.getEndPointBlackList().contains(endPoint))
+ .collect(Collectors.toList());
return scheduledExecutor.schedule(
this::syncTerminate, TERMINATION_GRACE_PERIOD_IN_MS,
TimeUnit.MILLISECONDS);
}
@@ -98,7 +103,6 @@ public class SimpleQueryTerminator implements
IQueryTerminator {
private List<TEndPoint> getRelatedHost(List<FragmentInstance>
fragmentInstances) {
return fragmentInstances.stream()
.map(instance -> instance.getHostDataNode().internalEndPoint)
- .filter(endPoint ->
!queryContext.getEndPointBlackList().contains(endPoint))
.distinct()
.collect(Collectors.toList());
}