This is an automated email from the ASF dual-hosted git repository. jxue pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/helix.git
commit c74aff173fabee7324ba021df0ec2668094b9c2f Author: Junkai Xue <[email protected]> AuthorDate: Wed Dec 14 19:57:28 2022 -0800 Revert "Revert "Reducing zk operations default retry timeout. (#2293)"" This reverts commit c9d1eb187a12826af38776537353023a33a324d9. --- .../org/apache/helix/zookeeper/api/client/RealmAwareZkClient.java | 4 +++- .../main/java/org/apache/helix/zookeeper/impl/client/ZkClient.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/zookeeper-api/src/main/java/org/apache/helix/zookeeper/api/client/RealmAwareZkClient.java b/zookeeper-api/src/main/java/org/apache/helix/zookeeper/api/client/RealmAwareZkClient.java index 99874c7eb..ac0240d5f 100644 --- a/zookeeper-api/src/main/java/org/apache/helix/zookeeper/api/client/RealmAwareZkClient.java +++ b/zookeeper-api/src/main/java/org/apache/helix/zookeeper/api/client/RealmAwareZkClient.java @@ -63,7 +63,9 @@ public interface RealmAwareZkClient { SINGLE_REALM, MULTI_REALM } - int DEFAULT_OPERATION_TIMEOUT = Integer.MAX_VALUE; + // Setting default operation retry timeout to 24 hours. It can also be overwritten via RealmAwareZkClientConfig. + // This timeout will be used while retrying zookeeper operations. + int DEFAULT_OPERATION_TIMEOUT = 24 * 60 * 60 * 1000; int DEFAULT_CONNECTION_TIMEOUT = 60 * 1000; int DEFAULT_SESSION_TIMEOUT = 30 * 1000; diff --git a/zookeeper-api/src/main/java/org/apache/helix/zookeeper/impl/client/ZkClient.java b/zookeeper-api/src/main/java/org/apache/helix/zookeeper/impl/client/ZkClient.java index 7e5c80a7e..915a60777 100644 --- a/zookeeper-api/src/main/java/org/apache/helix/zookeeper/impl/client/ZkClient.java +++ b/zookeeper-api/src/main/java/org/apache/helix/zookeeper/impl/client/ZkClient.java @@ -61,7 +61,9 @@ import org.slf4j.LoggerFactory; public class ZkClient extends org.apache.helix.zookeeper.zkclient.ZkClient implements HelixZkClient { private static Logger LOG = LoggerFactory.getLogger(ZkClient.class); - public static final int DEFAULT_OPERATION_TIMEOUT = Integer.MAX_VALUE; + // Setting default operation retry timeout to 24 hours. It can also be overwritten via RealmAwareZkClientConfig. + // This timeout will be used while retrying zookeeper operations. + public static final int DEFAULT_OPERATION_TIMEOUT = 24 * 60 * 60 * 1000; public static final int DEFAULT_CONNECTION_TIMEOUT = 60 * 1000; public static final int DEFAULT_SESSION_TIMEOUT = 30 * 1000;
