From 63420bbedc10e95e132b05040edd12235cd6cb2d Mon Sep 17 00:00:00 2001 From: zhaoliwei Date: Tue, 19 Nov 2019 10:15:04 +0800 Subject: [PATCH] use operation timeout --- src/main/java/com/xiaomi/infra/pegasus/rpc/Cluster.java | 3 --- .../com/xiaomi/infra/pegasus/rpc/async/ClusterManager.java | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/com/xiaomi/infra/pegasus/rpc/Cluster.java b/src/main/java/com/xiaomi/infra/pegasus/rpc/Cluster.java index bf3b481d..5dcdcad4 100644 --- a/src/main/java/com/xiaomi/infra/pegasus/rpc/Cluster.java +++ b/src/main/java/com/xiaomi/infra/pegasus/rpc/Cluster.java @@ -8,9 +8,6 @@ import java.util.Properties; public abstract class Cluster { - public static final int SOCK_TIMEOUT = 1000; - public static final int QUERY_META_TIMEOUT = 1000; - public static final String PEGASUS_META_SERVERS_KEY = "meta_servers"; public static final String PEGASUS_OPERATION_TIMEOUT_KEY = "operation_timeout"; diff --git a/src/main/java/com/xiaomi/infra/pegasus/rpc/async/ClusterManager.java b/src/main/java/com/xiaomi/infra/pegasus/rpc/async/ClusterManager.java index b8093752..b4b0c8c9 100644 --- a/src/main/java/com/xiaomi/infra/pegasus/rpc/async/ClusterManager.java +++ b/src/main/java/com/xiaomi/infra/pegasus/rpc/async/ClusterManager.java @@ -83,7 +83,7 @@ public ReplicaSession getReplicaSession(rpc_address address) { synchronized (this) { ss = replicaSessions.get(address); if (ss != null) return ss; - ss = new ReplicaSession(address, replicaGroup, Cluster.SOCK_TIMEOUT); + ss = new ReplicaSession(address, replicaGroup, operationTimeout); replicaSessions.put(address, ss); return ss; }