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

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


The following commit(s) were added to refs/heads/master by this push:
     new 91ce731bd8 Fix sendAsyncRequestToDataNode() method. (#6785)
91ce731bd8 is described below

commit 91ce731bd8c6e6072b3b30582bb86c6eacc4b0f5
Author: ZhangHongYin <[email protected]>
AuthorDate: Wed Jul 27 12:00:00 2022 +0800

    Fix sendAsyncRequestToDataNode() method. (#6785)
---
 .../confignode/client/async/datanode/AsyncDataNodeClientPool.java  | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git 
a/confignode/src/main/java/org/apache/iotdb/confignode/client/async/datanode/AsyncDataNodeClientPool.java
 
b/confignode/src/main/java/org/apache/iotdb/confignode/client/async/datanode/AsyncDataNodeClientPool.java
index 132386bce5..1547e617d8 100644
--- 
a/confignode/src/main/java/org/apache/iotdb/confignode/client/async/datanode/AsyncDataNodeClientPool.java
+++ 
b/confignode/src/main/java/org/apache/iotdb/confignode/client/async/datanode/AsyncDataNodeClientPool.java
@@ -24,6 +24,7 @@ import org.apache.iotdb.common.rpc.thrift.TEndPoint;
 import org.apache.iotdb.common.rpc.thrift.TFlushReq;
 import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet;
 import org.apache.iotdb.common.rpc.thrift.TSStatus;
+import org.apache.iotdb.common.rpc.thrift.TSetTTLReq;
 import org.apache.iotdb.commons.client.IClientManager;
 import 
org.apache.iotdb.commons.client.async.AsyncDataNodeInternalServiceClient;
 import org.apache.iotdb.confignode.client.ConfigNodeClientPoolFactory;
@@ -150,6 +151,9 @@ public class AsyncDataNodeClientPool {
     try {
       client = 
clientManager.borrowClient(dataNodeLocation.getInternalEndPoint());
       switch (handler.getDataNodeRequestType()) {
+        case SET_TTL:
+          client.setTTL((TSetTTLReq) req, (SetTTLHandler) handler);
+          break;
         case CREATE_DATA_REGIONS:
           client.createDataRegion((TCreateDataRegionReq) req, 
(CreateRegionHandler) handler);
           break;
@@ -173,6 +177,9 @@ public class AsyncDataNodeClientPool {
               (TUpdateConfigNodeGroupReq) req, (UpdateConfigNodeGroupHandler) 
handler);
           break;
         default:
+          LOGGER.error(
+              "Unexpected DataNode Request Type: {} when 
sendAsyncRequestToDataNode",
+              handler.getDataNodeRequestType());
       }
     } catch (Exception e) {
       LOGGER.warn(

Reply via email to