Skip to content

Commit

Permalink
add witness
Browse files Browse the repository at this point in the history
  • Loading branch information
lipanpan03 committed Dec 15, 2023
1 parent e19f676 commit 64fb6e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ private void refreshClientPool() {
ClusterInfo clusterInfo = JSON.parseObject(JSON.parseArray(result).get(0).toString(), new TypeReference<ClusterInfo>(){});
List<RaftState> raftStates = clusterInfo.getClusterInfo();
raftStates.forEach(x -> {
if (x.getState().equals(RaftState.StateConstant.WITNESS))
return;
TuGraphSingleRpcClient rpcClient = new TuGraphSingleRpcClient("list://" + x.getRpcAddress(), user, password);
rpcClientPool.add(rpcClient);
if (x.getState().equals(RaftState.StateConstant.MASTER)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public static class StateConstant {
public final static String MASTER = "MASTER";

public final static String FOLLOW = "FOLLOW";

public final static String WITNESS = "WITNESS";
}

}

0 comments on commit 64fb6e4

Please sign in to comment.