summaryrefslogtreecommitdiffstats
path: root/documentapi
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahoo-inc.com>2017-01-05 15:20:18 +0100
committerArne H Juul <arnej@yahoo-inc.com>2017-01-05 15:20:18 +0100
commit0a6aaa21823746089b8b8453e141b08f4e308b02 (patch)
tree7afa26af6aa6455c2ebebfe8168d63a2ef04c2fc /documentapi
parent948927736151bae42ebdd4f6b5a85acc86017bcb (diff)
transfer state to merged reply
* when merging a single error Reply to a new EmptyResult, we would lose state (like the carefully prepared retry delay setting).
Diffstat (limited to 'documentapi')
-rw-r--r--documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/ReplyMerger.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/ReplyMerger.java b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/ReplyMerger.java
index 2dad8312fc9..e0873a840d0 100644
--- a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/ReplyMerger.java
+++ b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/ReplyMerger.java
@@ -1,4 +1,4 @@
-// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.documentapi.messagebus.protocol;
import com.yahoo.collections.Tuple2;
@@ -58,6 +58,8 @@ final class ReplyMerger {
}
if (error == null) {
error = new EmptyReply();
+ r.swapState(error);
+ return;
}
for (int j = 0; j < r.getNumErrors(); ++j) {
error.addError(r.getError(j));