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 2022/09/14 09:49:55 UTC

[iotdb] 02/02: fix the bug in TestRPC

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

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

commit 255c0a376dc8bc91cbc42b08294ddf84bcaefc0b
Author: Jinrui.Zhang <xi...@gmail.com>
AuthorDate: Wed Sep 14 17:49:37 2022 +0800

    fix the bug in TestRPC
---
 .../src/main/java/org/apache/iotdb/db/mpp/plan/TestRPCClient.java | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/TestRPCClient.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/TestRPCClient.java
index 4a0b62e6d6..4a5b4169fe 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/TestRPCClient.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/TestRPCClient.java
@@ -35,7 +35,7 @@ import org.apache.iotdb.consensus.multileader.thrift.TTriggerSnapshotLoadReq;
 import org.apache.iotdb.consensus.multileader.thrift.TTriggerSnapshotLoadRes;
 import org.apache.iotdb.db.client.DataNodeClientPoolFactory;
 import org.apache.iotdb.mpp.rpc.thrift.TCreateDataRegionReq;
-import org.apache.iotdb.mpp.rpc.thrift.TMigrateRegionReq;
+import org.apache.iotdb.mpp.rpc.thrift.TMaintainPeerReq;
 
 import org.apache.thrift.TException;
 
@@ -96,8 +96,7 @@ public class TestRPCClient {
     try (SyncDataNodeInternalServiceClient client =
         INTERNAL_SERVICE_CLIENT_MANAGER.borrowClient(new TEndPoint("127.0.0.1", 9003))) {
       client.removeRegionPeer(
-          new TMigrateRegionReq(
-              new DataRegionId(1).convertToTConsensusGroupId(), getLocation2(3), getLocation2(3)));
+          new TMaintainPeerReq(new DataRegionId(1).convertToTConsensusGroupId(), getLocation2(3)));
     } catch (IOException | TException e) {
       throw new RuntimeException(e);
     }
@@ -107,8 +106,7 @@ public class TestRPCClient {
     try (SyncDataNodeInternalServiceClient client =
         INTERNAL_SERVICE_CLIENT_MANAGER.borrowClient(new TEndPoint("127.0.0.1", 9003))) {
       client.addRegionPeer(
-          new TMigrateRegionReq(
-              new DataRegionId(1).convertToTConsensusGroupId(), getLocation2(3), getLocation2(3)));
+          new TMaintainPeerReq(new DataRegionId(1).convertToTConsensusGroupId(), getLocation2(3)));
     } catch (IOException | TException e) {
       throw new RuntimeException(e);
     }