You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ta...@apache.org on 2023/10/10 06:59:01 UTC

[iotdb] branch jira6183 updated (b0ae7ce627c -> 06de31114bf)

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

tanxinyu pushed a change to branch jira6183
in repository https://gitbox.apache.org/repos/asf/iotdb.git


 discard b0ae7ce627c fix
     new 06de31114bf fix

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (b0ae7ce627c)
            \
             N -- N -- N   refs/heads/jira6183 (06de31114bf)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 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.


Summary of changes:
 .../org/apache/iotdb/commons/client/property/ThriftClientProperty.java   | 1 -
 1 file changed, 1 deletion(-)


[iotdb] 01/01: fix

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 06de31114bfa706dc36a0a1b333b6a0f6490995c
Author: OneSizeFitQuorum <ta...@apache.org>
AuthorDate: Tue Oct 10 14:47:07 2023 +0800

    fix
    
    Signed-off-by: OneSizeFitQuorum <ta...@apache.org>
---
 .../iotdb/consensus/iot/client/IoTConsensusClientPool.java    | 11 +++++++++--
 .../iotdb/commons/client/property/ThriftClientProperty.java   |  3 ++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/client/IoTConsensusClientPool.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/client/IoTConsensusClientPool.java
index 530d35a05aa..f013e218772 100644
--- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/client/IoTConsensusClientPool.java
+++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/client/IoTConsensusClientPool.java
@@ -25,6 +25,7 @@ import org.apache.iotdb.commons.client.ClientManagerMetrics;
 import org.apache.iotdb.commons.client.IClientPoolFactory;
 import org.apache.iotdb.commons.client.property.ClientPoolProperty;
 import org.apache.iotdb.commons.client.property.ThriftClientProperty;
+import org.apache.iotdb.commons.client.property.ThriftClientProperty.DefaultProperty;
 import org.apache.iotdb.commons.concurrent.ThreadName;
 import org.apache.iotdb.consensus.config.IoTConsensusConfig;
 
@@ -54,7 +55,10 @@ public class IoTConsensusClientPool {
               new SyncIoTConsensusServiceClient.Factory(
                   manager,
                   new ThriftClientProperty.Builder()
-                      .setConnectionTimeoutMs(config.getRpc().getConnectionTimeoutInMs())
+                      // We never let it time out, because the logic behind a timeout is also to
+                      // retry, which might actually worsen the situation. For example, resulting in
+                      // a significant increase in the number of file handles.
+                      .setConnectionTimeoutMs(DefaultProperty.CONNECTION_NEVER_TIMEOUT_MS)
                       .setRpcThriftCompressionEnabled(
                           config.getRpc().isRpcThriftCompressionEnabled())
                       .setPrintLogWhenEncounterException(
@@ -88,7 +92,10 @@ public class IoTConsensusClientPool {
               new AsyncIoTConsensusServiceClient.Factory(
                   manager,
                   new ThriftClientProperty.Builder()
-                      .setConnectionTimeoutMs(config.getRpc().getConnectionTimeoutInMs())
+                      // We never let it time out, because the logic behind a timeout is also to
+                      // retry, which might actually worsen the situation. For example, resulting in
+                      // a significant increase in the number of file handles.
+                      .setConnectionTimeoutMs(DefaultProperty.CONNECTION_NEVER_TIMEOUT_MS)
                       .setRpcThriftCompressionEnabled(
                           config.getRpc().isRpcThriftCompressionEnabled())
                       .setSelectorNumOfAsyncClientManager(
diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/property/ThriftClientProperty.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/property/ThriftClientProperty.java
index 29b2f122500..824eb648071 100644
--- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/property/ThriftClientProperty.java
+++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/property/ThriftClientProperty.java
@@ -108,12 +108,13 @@ public class ThriftClientProperty {
     }
   }
 
-  private static class DefaultProperty {
+  public static class DefaultProperty {
 
     private DefaultProperty() {}
 
     public static final boolean RPC_THRIFT_COMPRESSED_ENABLED = false;
     public static final int CONNECTION_TIMEOUT_MS = (int) TimeUnit.SECONDS.toMillis(20);
+    public static final int CONNECTION_NEVER_TIMEOUT_MS = 0;
     public static final int SELECTOR_NUM_OF_ASYNC_CLIENT_MANAGER = 1;
     public static final boolean PRINT_LOG_WHEN_ENCOUNTER_EXCEPTION = true;
   }