You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ne...@apache.org on 2022/12/22 02:18:09 UTC
[iotdb] branch apache_rel_1.0_iotconsens_client created (now d6fdaac2be)
This is an automated email from the ASF dual-hosted git repository.
neuyilan pushed a change to branch apache_rel_1.0_iotconsens_client
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at d6fdaac2be fix the comment
This branch includes the following new commits:
new 1cbe860d32 support modify the dn_max_connection_for_internal_servic of IoTConsensus
new d6fdaac2be fix the comment
The 2 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] 02/02: fix the comment
Posted by ne...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
neuyilan pushed a commit to branch apache_rel_1.0_iotconsens_client
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit d6fdaac2bee718b7bc4ca5b40ed14ca7a0317ed5
Author: HouliangQi <ne...@163.com>
AuthorDate: Thu Dec 22 09:10:12 2022 +0800
fix the comment
---
.../java/org/apache/iotdb/db/consensus/DataRegionConsensusImpl.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/server/src/main/java/org/apache/iotdb/db/consensus/DataRegionConsensusImpl.java b/server/src/main/java/org/apache/iotdb/db/consensus/DataRegionConsensusImpl.java
index 99110019f8..8701b0b7bf 100644
--- a/server/src/main/java/org/apache/iotdb/db/consensus/DataRegionConsensusImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/consensus/DataRegionConsensusImpl.java
@@ -82,6 +82,8 @@ public class DataRegionConsensusImpl {
.setThriftServerAwaitTimeForStopService(
conf.getThriftServerAwaitTimeForStopService())
.setThriftMaxFrameSize(conf.getThriftMaxFrameSize())
+ .setMaxConnectionForInternalService(
+ conf.getMaxConnectionForInternalService())
.build())
.setReplication(
IoTConsensusConfig.Replication.newBuilder()
[iotdb] 01/02: support modify the dn_max_connection_for_internal_servic of IoTConsensus
Posted by ne...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
neuyilan pushed a commit to branch apache_rel_1.0_iotconsens_client
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 1cbe860d32d7cba15f81cf0376b99eeeb73b40e5
Author: HouliangQi <ne...@163.com>
AuthorDate: Wed Dec 21 18:19:11 2022 +0800
support modify the dn_max_connection_for_internal_servic of IoTConsensus
---
.../iotdb/consensus/config/IoTConsensusConfig.java | 19 +++++++++++++++++--
.../consensus/iot/client/IoTConsensusClientPool.java | 7 ++++++-
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/config/IoTConsensusConfig.java b/consensus/src/main/java/org/apache/iotdb/consensus/config/IoTConsensusConfig.java
index d0600a1eee..5d7d27156d 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/config/IoTConsensusConfig.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/config/IoTConsensusConfig.java
@@ -75,6 +75,7 @@ public class IoTConsensusConfig {
private final int selectorNumOfClientManager;
private final int connectionTimeoutInMs;
private final int thriftMaxFrameSize;
+ private final int maxConnectionForInternalService;
private RPC(
int rpcSelectorThreadNum,
@@ -84,7 +85,8 @@ public class IoTConsensusConfig {
boolean isRpcThriftCompressionEnabled,
int selectorNumOfClientManager,
int connectionTimeoutInMs,
- int thriftMaxFrameSize) {
+ int thriftMaxFrameSize,
+ int maxConnectionForInternalService) {
this.rpcSelectorThreadNum = rpcSelectorThreadNum;
this.rpcMinConcurrentClientNum = rpcMinConcurrentClientNum;
this.rpcMaxConcurrentClientNum = rpcMaxConcurrentClientNum;
@@ -93,6 +95,7 @@ public class IoTConsensusConfig {
this.selectorNumOfClientManager = selectorNumOfClientManager;
this.connectionTimeoutInMs = connectionTimeoutInMs;
this.thriftMaxFrameSize = thriftMaxFrameSize;
+ this.maxConnectionForInternalService = maxConnectionForInternalService;
}
public int getRpcSelectorThreadNum() {
@@ -127,6 +130,10 @@ public class IoTConsensusConfig {
return thriftMaxFrameSize;
}
+ public int getMaxConnectionForInternalService() {
+ return maxConnectionForInternalService;
+ }
+
public static RPC.Builder newBuilder() {
return new RPC.Builder();
}
@@ -142,6 +149,8 @@ public class IoTConsensusConfig {
private int connectionTimeoutInMs = (int) TimeUnit.SECONDS.toMillis(20);
private int thriftMaxFrameSize = 536870912;
+ private int maxConnectionForInternalService = 100;
+
public RPC.Builder setRpcSelectorThreadNum(int rpcSelectorThreadNum) {
this.rpcSelectorThreadNum = rpcSelectorThreadNum;
return this;
@@ -183,6 +192,11 @@ public class IoTConsensusConfig {
return this;
}
+ public RPC.Builder setMaxConnectionForInternalService(int maxConnectionForInternalService) {
+ this.maxConnectionForInternalService = maxConnectionForInternalService;
+ return this;
+ }
+
public RPC build() {
return new RPC(
rpcSelectorThreadNum,
@@ -192,7 +206,8 @@ public class IoTConsensusConfig {
isRpcThriftCompressionEnabled,
selectorNumOfClientManager,
connectionTimeoutInMs,
- thriftMaxFrameSize);
+ thriftMaxFrameSize,
+ maxConnectionForInternalService);
}
}
}
diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/iot/client/IoTConsensusClientPool.java b/consensus/src/main/java/org/apache/iotdb/consensus/iot/client/IoTConsensusClientPool.java
index 3c7f4a4b8d..babc9fb4f5 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/iot/client/IoTConsensusClientPool.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/iot/client/IoTConsensusClientPool.java
@@ -35,6 +35,7 @@ public class IoTConsensusClientPool {
public static class SyncIoTConsensusServiceClientPoolFactory
implements IClientPoolFactory<TEndPoint, SyncIoTConsensusServiceClient> {
+
private final IoTConsensusConfig config;
public SyncIoTConsensusServiceClientPoolFactory(IoTConsensusConfig config) {
@@ -80,7 +81,11 @@ public class IoTConsensusClientPool {
config.getRpc().getSelectorNumOfClientManager())
.build(),
IOT_CONSENSUS_CLIENT_POOL_THREAD_NAME),
- new ClientPoolProperty.Builder<AsyncIoTConsensusServiceClient>().build().getConfig());
+ new ClientPoolProperty.Builder<AsyncIoTConsensusServiceClient>()
+ .setMaxIdleClientForEachNode(config.getRpc().getMaxConnectionForInternalService())
+ .setMaxTotalClientForEachNode(config.getRpc().getMaxConnectionForInternalService())
+ .build()
+ .getConfig());
}
}
}