aboutsummaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-11-06 12:50:04 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2018-11-06 12:50:04 +0100
commit558a99e4153baa344b40ef8647359bdd95a5a010 (patch)
treed4252e446c7328ceef44bb0a16aa4251cf781a46 /container-search
parent9db609fb56653be7e09e83ebfa5cb296cfa8ce75 (diff)
If you promise to deliver an answer, you must provide it.
Even if you already know it is negative.
Diffstat (limited to 'container-search')
-rw-r--r--container-search/src/main/java/com/yahoo/search/dispatch/RpcFillInvoker.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/RpcFillInvoker.java b/container-search/src/main/java/com/yahoo/search/dispatch/RpcFillInvoker.java
index 53f6015ad2e..fb72e8c77c9 100644
--- a/container-search/src/main/java/com/yahoo/search/dispatch/RpcFillInvoker.java
+++ b/container-search/src/main/java/com/yahoo/search/dispatch/RpcFillInvoker.java
@@ -44,7 +44,7 @@ public class RpcFillInvoker extends FillInvoker {
private GetDocsumsResponseReceiver responseReceiver;
- public RpcFillInvoker(RpcResourcePool resourcePool, DocumentDatabase documentDb) {
+ RpcFillInvoker(RpcResourcePool resourcePool, DocumentDatabase documentDb) {
this.documentDb = documentDb;
this.resourcePool = resourcePool;
}
@@ -96,11 +96,13 @@ public class RpcFillInvoker extends FillInvoker {
}
/** Send a getDocsums request to a node. Responses will be added to the given receiver. */
- private void sendGetDocsumsRequest(int nodeId, List<FastHit> hits, String summaryClass, CompressionType compression, Result result,
- GetDocsumsResponseReceiver responseReceiver) {
+ private void sendGetDocsumsRequest(int nodeId, List<FastHit> hits, String summaryClass, CompressionType compression,
+ Result result, GetDocsumsResponseReceiver responseReceiver) {
Client.NodeConnection node = resourcePool.nodeConnections().get(nodeId);
if (node == null) {
- result.hits().addError(ErrorMessage.createEmptyDocsums("Could not fill hits from unknown node " + nodeId));
+ String error = "Could not fill hits from unknown node " + nodeId;
+ responseReceiver.receive(Client.GetDocsumsResponseOrError.fromError(error));
+ result.hits().addError(ErrorMessage.createEmptyDocsums(error));
log.warning("Got hits with partid " + nodeId + ", which is not included in the current dispatch config");
return;
}
@@ -150,7 +152,7 @@ public class RpcFillInvoker extends FillInvoker {
/** The number of responses we should receive (and process) before this is complete */
private int outstandingResponses;
- public GetDocsumsResponseReceiver(int requestCount, Compressor compressor, Result result) {
+ GetDocsumsResponseReceiver(int requestCount, Compressor compressor, Result result) {
this.compressor = compressor;
responses = new LinkedBlockingQueue<>(requestCount);
outstandingResponses = requestCount;
@@ -170,7 +172,7 @@ public class RpcFillInvoker extends FillInvoker {
* Call this from the dispatcher thread to initiate and complete processing of responses.
* This will block until all responses are available and processed, or to timeout.
*/
- public void processResponses(Query query, String summaryClass, DocumentDatabase documentDb) throws TimeoutException {
+ void processResponses(Query query, String summaryClass, DocumentDatabase documentDb) throws TimeoutException {
try {
int skippedHits = 0;
while (outstandingResponses > 0) {