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
The following commit(s) were added to refs/heads/master by this push:
new f4016b706 Reducing zk operations default retry timeout. (#2293)
f4016b706 is described below
commit f4016b706ac26716b85330b07771b7b0fe54ba17
Author: Rahul Rane <[email protected]>
AuthorDate: Tue Dec 6 18:43:06 2022 -0800
Reducing zk operations default retry timeout. (#2293)
---
.../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;