aboutsummaryrefslogtreecommitdiffstats
path: root/documentapi
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahoo-inc.com>2017-01-06 11:53:45 +0100
committerArne H Juul <arnej@yahoo-inc.com>2017-01-09 08:52:55 +0100
commit2ce1e387500e90fa9aea05dc57326a2bbe388436 (patch)
tree08478aba4029e5529a11a631e859ffa8c7e09fba /documentapi
parent854ac9d8f70a17da09fbd412db7c8efa31ae662b (diff)
keep retry delay from packet
* keep retry delay if it's set to some specific (positive) value in the reply already.
Diffstat (limited to 'documentapi')
-rw-r--r--documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/StoragePolicy.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/StoragePolicy.java b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/StoragePolicy.java
index fdb4b8f6339..7f8121c2138 100644
--- a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/StoragePolicy.java
+++ b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/StoragePolicy.java
@@ -326,9 +326,13 @@ public class StoragePolicy extends ExternalSlobrokPolicy {
}
}
if (context.usedState != null && newState.getVersion() <= context.usedState.getVersion()) {
- reply.setRetryDelay(-1);
+ if (reply.getRetryDelay() <= 0.0) {
+ reply.setRetryDelay(-1);
+ }
} else {
- reply.setRetryDelay(0);
+ if (reply.getRetryDelay() <= 0.0) {
+ reply.setRetryDelay(0);
+ }
}
if (context.calculatedDistributor == null) {
if (cachedClusterState == null) {