Skip to content

Instantly share code, notes, and snippets.

@afeinberg
Created March 5, 2010 05:15
Show Gist options
  • Save afeinberg/322465 to your computer and use it in GitHub Desktop.
Save afeinberg/322465 to your computer and use it in GitHub Desktop.
iff --git a/src/java/voldemort/client/ClientConfig.java b/src/java/voldemort/client/ClientConfig.java
index d0025ff..5459f1b 100644
--- a/src/java/voldemort/client/ClientConfig.java
+++ b/src/java/voldemort/client/ClientConfig.java
@@ -58,7 +58,7 @@ public class ClientConfig {
private volatile long failureDetectorThresholdInterval = FailureDetectorConfig.DEFAULT_THRESHOLD_INTERVAL;
private volatile long failureDetectorAsyncRecoveryInterval = FailureDetectorConfig.DEFAULT_ASYNC_RECOVERY_INTERVAL;
private volatile List<String> failureDetectorCatastrophicErrorTypes = FailureDetectorConfig.DEFAULT_CATASTROPHIC_ERROR_TYPES;
- private long failureDetectorRequestLengthThreshold = FailureDetectorConfig.DEFAULT_REQUEST_LENGTH_THRESHOLD;
+ private long failureDetectorRequestLengthThreshold = socketTimeoutMs;
private volatile int maxBootstrapRetries = 2;
@@ -175,7 +175,7 @@ public class ClientConfig {
if(props.containsKey(FAILUREDETECTOR_REQUEST_LENGTH_THRESHOLD_PROPERTY))
this.setFailureDetectorRequestLengthThreshold(props.getLong(FAILUREDETECTOR_REQUEST_LENGTH_THRESHOLD_PROPERTY));
else
- this.setFailureDetectorRequestLengthThreshold(getRoutingTimeout(TimeUnit.MILLISECONDS) / 10);
+ this.setFailureDetectorRequestLengthThreshold(getSocketTimeout(TimeUnit.MILLISECONDS));
if(props.containsKey(MAX_BOOTSTRAP_RETRIES))
this.setMaxBootstrapRetries(props.getInt(MAX_BOOTSTRAP_RETRIES));
diff --git a/src/java/voldemort/cluster/failuredetector/FailureDetectorConfig.java b/src/java/voldemort/cluster/failuredetector/FailureDetectorConfig.java
index c58f01b..470492e 100644
--- a/src/java/voldemort/cluster/failuredetector/FailureDetectorConfig.java
+++ b/src/java/voldemort/cluster/failuredetector/FailureDetectorConfig.java
@@ -57,7 +57,7 @@ public class FailureDetectorConfig {
UnknownHostException.class.getName(),
NoRouteToHostException.class.getName());
- public static final long DEFAULT_REQUEST_LENGTH_THRESHOLD = 1000;
+ public static final long DEFAULT_REQUEST_LENGTH_THRESHOLD = 5000;
protected String implementationClassName = DEFAULT_IMPLEMENTATION_CLASS_NAME;
diff --git a/src/java/voldemort/server/VoldemortConfig.java b/src/java/voldemort/server/VoldemortConfig.java
index 5c0c71c..459298d 100644
--- a/src/java/voldemort/server/VoldemortConfig.java
+++ b/src/java/voldemort/server/VoldemortConfig.java
@@ -315,7 +315,7 @@ public class VoldemortConfig implements Serializable {
this.failureDetectorCatastrophicErrorTypes = props.getList("failuredetector.catastrophic.error.types",
FailureDetectorConfig.DEFAULT_CATASTROPHIC_ERROR_TYPES);
this.failureDetectorRequestLengthThreshold = props.getLong("failuredetector.request.length.threshold",
- clientRoutingTimeoutMs / 10);
+ getSocketTimeoutMs());
// network class loader disable by default.
this.enableNetworkClassLoader = props.getBoolean("enable.network.classloader", false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment