summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-09-09 16:37:46 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2022-09-09 16:37:46 +0200
commitc6552160827cd02d3aa0c0439f15be1823dc754a (patch)
tree3aa263f7f69637cba465a8ec0308125fc7ab6777
parente0dcdda7286506373b2f60e657afb931ca5edf8b (diff)
soonActive => targetActive
Wire in targetActive in MonitorReply/Pong.
-rw-r--r--container-core/abi-spec.json4
-rw-r--r--container-core/src/main/java/com/yahoo/container/handler/Coverage.java28
-rw-r--r--container-core/src/main/java/com/yahoo/container/logging/Coverage.java8
-rw-r--r--container-search/abi-spec.json2
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/Pong.java35
-rw-r--r--container-search/src/main/java/com/yahoo/search/dispatch/InterleavedSearchInvoker.java10
-rw-r--r--container-search/src/main/java/com/yahoo/search/dispatch/rpc/ProtobufSerialization.java4
-rw-r--r--container-search/src/main/java/com/yahoo/search/dispatch/rpc/RpcPing.java2
-rw-r--r--container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Group.java8
-rw-r--r--container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Node.java11
-rw-r--r--container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java1
-rw-r--r--container-search/src/main/java/com/yahoo/search/result/Coverage.java7
-rw-r--r--container-search/src/test/java/com/yahoo/search/dispatch/InterleavedSearchInvokerTest.java4
-rw-r--r--container-search/src/test/java/com/yahoo/search/dispatch/searchcluster/SearchClusterTest.java2
-rw-r--r--container-search/src/test/java/com/yahoo/search/result/test/CoverageTestCase.java2
15 files changed, 64 insertions, 64 deletions
diff --git a/container-core/abi-spec.json b/container-core/abi-spec.json
index 9c14c03ba21..6e4fc74fdc6 100644
--- a/container-core/abi-spec.json
+++ b/container-core/abi-spec.json
@@ -207,7 +207,7 @@
"public void merge(com.yahoo.container.handler.Coverage)",
"public long getDocs()",
"public long getActive()",
- "public long getSoonActive()",
+ "public long getTargetActive()",
"public boolean isDegraded()",
"public boolean isDegradedByMatchPhase()",
"public boolean isDegradedByTimeout()",
@@ -225,7 +225,7 @@
"fields": [
"protected long docs",
"protected long active",
- "protected long soonActive",
+ "protected long targetActive",
"protected int degradedReason",
"protected int nodes",
"protected int resultSets",
diff --git a/container-core/src/main/java/com/yahoo/container/handler/Coverage.java b/container-core/src/main/java/com/yahoo/container/handler/Coverage.java
index 09ddccc4204..3f8d085af9e 100644
--- a/container-core/src/main/java/com/yahoo/container/handler/Coverage.java
+++ b/container-core/src/main/java/com/yahoo/container/handler/Coverage.java
@@ -1,9 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.handler;
-
-import com.yahoo.api.annotations.Beta;
-
/**
* The coverage report for a result set.
*
@@ -14,7 +11,7 @@ public class Coverage {
protected long docs;
protected long active;
- protected long soonActive;
+ protected long targetActive;
protected int degradedReason;
protected int nodes;
private int nodesTried;
@@ -55,7 +52,7 @@ public class Coverage {
this.nodes = nodes;
this.nodesTried = nodes;
this.active = active;
- this.soonActive = active;
+ this.targetActive = active;
this.degradedReason = 0;
this.resultSets = resultSets;
this.fullReason = fullReason;
@@ -69,7 +66,7 @@ public class Coverage {
nodes += other.getNodes();
nodesTried += other.nodesTried;
active += other.getActive();
- soonActive += other.getSoonActive();
+ targetActive += other.getTargetActive();
degradedReason |= other.degradedReason;
resultSets += other.getResultSets();
fullResultSets += other.getFullResultSets();
@@ -104,10 +101,8 @@ public class Coverage {
/**
* Returns the total number of documents that will be searchable once redistribution has settled.
- * Still in beta, semantics not finalized yet.
*/
- @Beta
- public long getSoonActive() { return soonActive; }
+ public long getTargetActive() { return targetActive; }
public boolean isDegraded() { return (degradedReason != 0) || isDegradedByNonIdealState(); }
public boolean isDegradedByMatchPhase() { return (degradedReason & DEGRADED_BY_MATCH_PHASE) != 0; }
@@ -117,16 +112,11 @@ public class Coverage {
/** Returns whether the search had full coverage or not */
public boolean getFull() {
- switch (fullReason) {
- case EXPLICITLY_FULL:
- return true;
- case EXPLICITLY_INCOMPLETE:
- return false;
- case DOCUMENT_COUNT:
- return docs == active;
- default:
- throw new IllegalStateException("Implementation out of sync. Please report this as a bug.");
- }
+ return switch (fullReason) {
+ case EXPLICITLY_FULL: yield true;
+ case EXPLICITLY_INCOMPLETE: yield false;
+ case DOCUMENT_COUNT: yield docs == active;
+ };
}
/** Returns the number of search instances which participated successfully in the search. */
diff --git a/container-core/src/main/java/com/yahoo/container/logging/Coverage.java b/container-core/src/main/java/com/yahoo/container/logging/Coverage.java
index d952cbd7490..98d685393dc 100644
--- a/container-core/src/main/java/com/yahoo/container/logging/Coverage.java
+++ b/container-core/src/main/java/com/yahoo/container/logging/Coverage.java
@@ -7,15 +7,15 @@ package com.yahoo.container.logging;
public class Coverage {
private final long docs;
private final long active;
- private final long soonActive;
+ private final long targetActive;
private final int degradedReason;
private final static int DEGRADED_BY_MATCH_PHASE = 1;
private final static int DEGRADED_BY_TIMEOUT = 2;
private final static int DEGRADED_BY_ADAPTIVE_TIMEOUT = 4;
- public Coverage(long docs, long active, long soonActive, int degradedReason) {
+ public Coverage(long docs, long active, long targetActive, int degradedReason) {
this.docs = docs;
this.active = active;
- this.soonActive = soonActive;
+ this.targetActive = targetActive;
this.degradedReason = degradedReason;
}
@@ -41,7 +41,7 @@ public class Coverage {
return v;
}
- public long getTargetActive() { return soonActive; }
+ public long getTargetActive() { return targetActive; }
public boolean isDegraded() { return (degradedReason != 0) || isDegradedByNonIdealState(); }
public boolean isDegradedByMatchPhase() { return (degradedReason & DEGRADED_BY_MATCH_PHASE) != 0; }
diff --git a/container-search/abi-spec.json b/container-search/abi-spec.json
index 87fdfb1379a..93e8ce16b6f 100644
--- a/container-search/abi-spec.json
+++ b/container-search/abi-spec.json
@@ -7485,7 +7485,7 @@
"public void <init>(long, long)",
"public void <init>(long, long, int)",
"public void <init>(long, long, int, int)",
- "public com.yahoo.search.result.Coverage setSoonActive(long)",
+ "public com.yahoo.search.result.Coverage setTargetActive(long)",
"public com.yahoo.search.result.Coverage setDegradedReason(int)",
"public com.yahoo.search.result.Coverage setNodesTried(int)",
"public bridge synthetic com.yahoo.container.handler.Coverage setNodesTried(int)"
diff --git a/container-search/src/main/java/com/yahoo/prelude/Pong.java b/container-search/src/main/java/com/yahoo/prelude/Pong.java
index ecd6e302ccc..69bd89ecd57 100644
--- a/container-search/src/main/java/com/yahoo/prelude/Pong.java
+++ b/container-search/src/main/java/com/yahoo/prelude/Pong.java
@@ -4,9 +4,7 @@ package com.yahoo.prelude;
import com.yahoo.search.result.ErrorMessage;
import com.yahoo.search.statistics.ElapsedTime;
-import java.util.List;
import java.util.Optional;
-import java.util.stream.Collectors;
/**
* An answer from Ping.
@@ -16,42 +14,47 @@ import java.util.stream.Collectors;
public class Pong {
private final ElapsedTime elapsed = new ElapsedTime();
- private final Optional<Long> activeDocuments;
+ private final Long activeDocuments;
+ private final Long targetActiveDocuments;
private final boolean isBlockingWrites;
- private final Optional<ErrorMessage> error;
+ private final ErrorMessage error;
public Pong() {
- this(Optional.empty(), false, Optional.empty());
+ this(null, null,false, null);
}
public Pong(ErrorMessage error) {
- this(Optional.empty(), false, Optional.of(error));
+ this(null, null,false, error);
}
- public Pong(long activeDocuments) {
- this(Optional.of(activeDocuments), false, Optional.empty());
+ public Pong(long activeDocuments, long targetActiveDocuments) {
+ this(activeDocuments, targetActiveDocuments, false, null);
}
- public Pong(long activeDocuments, boolean isBlockingWrites) {
- this(Optional.of(activeDocuments), isBlockingWrites, Optional.empty());
+ public Pong(long activeDocuments, long targetActiveDocuments, boolean isBlockingWrites) {
+ this(activeDocuments, targetActiveDocuments, isBlockingWrites, null);
}
- private Pong(Optional<Long> activeDocuments, boolean isBlockingWrites, Optional<ErrorMessage> error) {
+ private Pong(Long activeDocuments, Long targetActiveDocuments, boolean isBlockingWrites, ErrorMessage error) {
this.activeDocuments = activeDocuments;
+ this.targetActiveDocuments = targetActiveDocuments;
this.isBlockingWrites = isBlockingWrites;
this.error = error;
}
- public Optional<ErrorMessage> error() { return error; }
+ public Optional<ErrorMessage> error() { return Optional.ofNullable(error); }
/** Returns the number of active documents in the backend responding in this Pong, if available */
- public Optional<Long> activeDocuments() { return activeDocuments; }
+ public Optional<Long> activeDocuments() { return Optional.ofNullable(activeDocuments); }
+
+ /** Returns the number of target active documents in the backend responding in this Pong, if available */
+ public Optional<Long> targetActiveDocuments() { return Optional.ofNullable(targetActiveDocuments); }
/** Returns true if the pinged node is currently blocking write operations due to being full */
public boolean isBlockingWrites() { return isBlockingWrites; }
/** Returns whether there is an error or not */
- public boolean badResponse() { return error.isPresent(); }
+ public boolean badResponse() { return error != null; }
public ElapsedTime getElapsedTime() { return elapsed; }
@@ -59,10 +62,10 @@ public class Pong {
@Override
public String toString() {
StringBuilder m = new StringBuilder("Ping result");
- activeDocuments.ifPresent(docCount -> m.append(" active docs: ").append(docCount));
+ activeDocuments().ifPresent(docCount -> m.append(" active docs: ").append(docCount));
if (isBlockingWrites)
m.append(" blocking writes: true");
- error.ifPresent(e -> m.append(" error: ").append(error));
+ error().ifPresent(e -> m.append(" error: ").append(error));
return m.toString();
}
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/InterleavedSearchInvoker.java b/container-search/src/main/java/com/yahoo/search/dispatch/InterleavedSearchInvoker.java
index 7b993e51ffb..8c92e8b0270 100644
--- a/container-search/src/main/java/com/yahoo/search/dispatch/InterleavedSearchInvoker.java
+++ b/container-search/src/main/java/com/yahoo/search/dispatch/InterleavedSearchInvoker.java
@@ -54,7 +54,7 @@ public class InterleavedSearchInvoker extends SearchInvoker implements ResponseM
private long answeredDocs = 0;
private long answeredActiveDocs = 0;
- private long answeredSoonActiveDocs = 0;
+ private long answeredTargetActiveDocs = 0;
private int askedNodes = 0;
private int answeredNodes = 0;
private int answeredNodesParticipated = 0;
@@ -268,7 +268,7 @@ public class InterleavedSearchInvoker extends SearchInvoker implements ResponseM
private void collectCoverage(Coverage source) {
answeredDocs += source.getDocs();
answeredActiveDocs += source.getActive();
- answeredSoonActiveDocs += source.getTargetActive();
+ answeredTargetActiveDocs += source.getTargetActive();
answeredNodesParticipated += source.getNodes();
answeredNodes++;
degradedByMatchPhase |= source.isDegradedByMatchPhase();
@@ -280,7 +280,7 @@ public class InterleavedSearchInvoker extends SearchInvoker implements ResponseM
Coverage coverage = new Coverage(answeredDocs, answeredActiveDocs, answeredNodesParticipated, 1);
coverage.setNodesTried(askedNodes);
- coverage.setTargetActive(answeredSoonActiveDocs);
+ coverage.setTargetActive(answeredTargetActiveDocs);
int degradedReason = 0;
if (timedOut) {
degradedReason |= (adaptiveTimeoutCalculated ? DEGRADED_BY_ADAPTIVE_TIMEOUT : DEGRADED_BY_TIMEOUT);
@@ -300,14 +300,14 @@ public class InterleavedSearchInvoker extends SearchInvoker implements ResponseM
if (adaptiveTimeoutCalculated && answeredNodesParticipated > 0) {
answeredActiveDocs += (notAnswered * answeredActiveDocs / answeredNodesParticipated);
- answeredSoonActiveDocs += (notAnswered * answeredSoonActiveDocs / answeredNodesParticipated);
+ answeredTargetActiveDocs += (notAnswered * answeredTargetActiveDocs / answeredNodesParticipated);
} else {
if (askedNodes > answeredNodesParticipated) {
int searchableCopies = (int) searchCluster.dispatchConfig().searchableCopies();
int missingNodes = notAnswered - (searchableCopies - 1);
if (answeredNodesParticipated > 0) {
answeredActiveDocs += (missingNodes * answeredActiveDocs / answeredNodesParticipated);
- answeredSoonActiveDocs += (missingNodes * answeredSoonActiveDocs / answeredNodesParticipated);
+ answeredTargetActiveDocs += (missingNodes * answeredTargetActiveDocs / answeredNodesParticipated);
timedOut = true;
}
}
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/rpc/ProtobufSerialization.java b/container-search/src/main/java/com/yahoo/search/dispatch/rpc/ProtobufSerialization.java
index 73a005d809d..de4f4f45eed 100644
--- a/container-search/src/main/java/com/yahoo/search/dispatch/rpc/ProtobufSerialization.java
+++ b/container-search/src/main/java/com/yahoo/search/dispatch/rpc/ProtobufSerialization.java
@@ -263,7 +263,7 @@ public class ProtobufSerialization {
private static Coverage convertToCoverage(SearchProtocol.SearchReply protobuf) {
var coverage = new Coverage(protobuf.getCoverageDocs(), protobuf.getActiveDocs(), 1);
- coverage.setNodesTried(1).setTargetActive(protobuf.getSoonActiveDocs());
+ coverage.setNodesTried(1).setTargetActive(protobuf.getTargetActiveDocs());
int degradedReason = 0;
if (protobuf.getDegradedByMatchPhase())
@@ -280,7 +280,7 @@ public class ProtobufSerialization {
var coverage = result.getCoverage(false);
if (coverage != null) {
- builder.setCoverageDocs(coverage.getDocs()).setActiveDocs(coverage.getActive()).setSoonActiveDocs(coverage.getTargetActive())
+ builder.setCoverageDocs(coverage.getDocs()).setActiveDocs(coverage.getActive()).setTargetActiveDocs(coverage.getTargetActive())
.setDegradedBySoftTimeout(coverage.isDegradedByTimeout()).setDegradedByMatchPhase(coverage.isDegradedByMatchPhase());
}
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/rpc/RpcPing.java b/container-search/src/main/java/com/yahoo/search/dispatch/rpc/RpcPing.java
index 8e99f4948ce..44f0af2aca1 100644
--- a/container-search/src/main/java/com/yahoo/search/dispatch/rpc/RpcPing.java
+++ b/container-search/src/main/java/com/yahoo/search/dispatch/rpc/RpcPing.java
@@ -81,7 +81,7 @@ public class RpcPing implements Pinger, Client.ResponseReceiver {
} else if (!reply.getOnline()) {
return new Pong(ErrorMessage.createBackendCommunicationError("Node id " + node.key() + " reports being offline"));
} else {
- return new Pong(reply.getActiveDocs(), reply.getIsBlockingWrites());
+ return new Pong(reply.getActiveDocs(), reply.getTargetActiveDocs(), reply.getIsBlockingWrites());
}
}
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Group.java b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Group.java
index d30abd1d047..cf161638104 100644
--- a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Group.java
+++ b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Group.java
@@ -26,6 +26,7 @@ public class Group {
private final AtomicBoolean hasSufficientCoverage = new AtomicBoolean(true);
private final AtomicBoolean hasFullCoverage = new AtomicBoolean(true);
private final AtomicLong activeDocuments = new AtomicLong(0);
+ private final AtomicLong targetActiveDocuments = new AtomicLong(0);
private final AtomicBoolean isBlockingWrites = new AtomicBoolean(false);
private final AtomicBoolean isBalanced = new AtomicBoolean(true);
@@ -68,6 +69,8 @@ public class Group {
public void aggregateNodeValues() {
long activeDocs = nodes.stream().filter(node -> node.isWorking() == Boolean.TRUE).mapToLong(Node::getActiveDocuments).sum();
activeDocuments.set(activeDocs);
+ long targetActiveDocs = nodes.stream().filter(node -> node.isWorking() == Boolean.TRUE).mapToLong(Node::getTargetActiveDocuments).sum();
+ targetActiveDocuments.set(targetActiveDocs);
isBlockingWrites.set(nodes.stream().anyMatch(Node::isBlockingWrites));
int numWorkingNodes = workingNodes();
if (numWorkingNodes > 0) {
@@ -90,6 +93,9 @@ public class Group {
/** Returns the active documents on this group. If unknown, 0 is returned. */
long activeDocuments() { return activeDocuments.get(); }
+ /** Returns the target active documents on this group. If unknown, 0 is returned. */
+ long targetActiveDocuments() { return targetActiveDocuments.get(); }
+
/** Returns whether any node in this group is currently blocking write operations */
public boolean isBlockingWrites() { return isBlockingWrites.get(); }
@@ -99,7 +105,7 @@ public class Group {
/** Returns whether this group has too few documents per node to expect it to be balanced */
public boolean isSparse() {
if (nodes.isEmpty()) return false;
- return activeDocuments.get() / nodes.size() < minDocsPerNodeToRequireLowSkew;
+ return activeDocuments() / nodes.size() < minDocsPerNodeToRequireLowSkew;
}
public boolean fullCoverageStatusChanged(boolean hasFullCoverageNow) {
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Node.java b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Node.java
index 0dce3d84273..d9c0198a472 100644
--- a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Node.java
+++ b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/Node.java
@@ -21,6 +21,7 @@ public class Node {
private final AtomicBoolean statusIsKnown = new AtomicBoolean(false);
private final AtomicBoolean working = new AtomicBoolean(true);
private final AtomicLong activeDocuments = new AtomicLong(0);
+ private final AtomicLong targetActiveDocuments = new AtomicLong(0);
private final AtomicLong pingSequence = new AtomicLong(0);
private final AtomicLong lastPong = new AtomicLong(0);
private final AtomicBoolean isBlockingWrites = new AtomicBoolean(false);
@@ -62,6 +63,7 @@ public class Node {
this.working.lazySet(working);
if ( ! working ) {
activeDocuments.set(0);
+ targetActiveDocuments.set(0);
}
}
@@ -71,10 +73,12 @@ public class Node {
}
/** Updates the active documents on this node */
- public void setActiveDocuments(long activeDocuments) { this.activeDocuments.set(activeDocuments); }
+ public void setActiveDocuments(long documents) { this.activeDocuments.set(documents); }
+ public void setTargetActiveDocuments(long documents) { this.targetActiveDocuments.set(documents); }
/** Returns the active documents on this node. If unknown, 0 is returned. */
long getActiveDocuments() { return activeDocuments.get(); }
+ long getTargetActiveDocuments() { return targetActiveDocuments.get(); }
public void setBlockingWrites(boolean isBlockingWrites) { this.isBlockingWrites.set(isBlockingWrites); }
@@ -86,8 +90,7 @@ public class Node {
@Override
public boolean equals(Object o) {
if (o == this) return true;
- if ( ! (o instanceof Node)) return false;
- Node other = (Node)o;
+ if ( ! (o instanceof Node other)) return false;
if ( ! Objects.equals(this.hostname, other.hostname)) return false;
if ( ! Objects.equals(this.key, other.key)) return false;
if ( ! Objects.equals(this.pathIndex, other.pathIndex)) return false;
@@ -100,7 +103,7 @@ public class Node {
public String toString() {
return "search node key = " + key + " hostname = "+ hostname + " path = " + pathIndex + " in group " + group +
" statusIsKnown = " + statusIsKnown.get() + " working = " + working.get() +
- " activeDocs = " + activeDocuments.get();
+ " activeDocs = " + getActiveDocuments() + " targetActiveDocs = " + getTargetActiveDocuments();
}
}
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java
index f8c4627473d..82d3d98d9ef 100644
--- a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java
+++ b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java
@@ -339,6 +339,7 @@ public class SearchCluster implements NodeManager<Node> {
} else {
if (pong.activeDocuments().isPresent()) {
node.setActiveDocuments(pong.activeDocuments().get());
+ node.setTargetActiveDocuments(pong.targetActiveDocuments().get());
node.setBlockingWrites(pong.isBlockingWrites());
}
clusterMonitor.responded(node);
diff --git a/container-search/src/main/java/com/yahoo/search/result/Coverage.java b/container-search/src/main/java/com/yahoo/search/result/Coverage.java
index bab5af8974e..390c6ec4435 100644
--- a/container-search/src/main/java/com/yahoo/search/result/Coverage.java
+++ b/container-search/src/main/java/com/yahoo/search/result/Coverage.java
@@ -1,8 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.result;
-import com.yahoo.api.annotations.Beta;
-
/**
* The coverage report for a result set.
*
@@ -26,11 +24,10 @@ public class Coverage extends com.yahoo.container.handler.Coverage {
/**
* Will set number of documents present in ideal state
*
- * @param soonActive number of documents active in ideal state
+ * @param targetActive number of documents active in ideal state
* @return self for chaining
*/
- @Beta
- public Coverage setTargetActive(long soonActive) { this.soonActive = soonActive; return this; }
+ public Coverage setTargetActive(long targetActive) { this.targetActive = targetActive; return this; }
/**
* Will set the reasons for degraded coverage as reported by vespa backend.
diff --git a/container-search/src/test/java/com/yahoo/search/dispatch/InterleavedSearchInvokerTest.java b/container-search/src/test/java/com/yahoo/search/dispatch/InterleavedSearchInvokerTest.java
index a225254079e..a88046197e0 100644
--- a/container-search/src/test/java/com/yahoo/search/dispatch/InterleavedSearchInvokerTest.java
+++ b/container-search/src/test/java/com/yahoo/search/dispatch/InterleavedSearchInvokerTest.java
@@ -436,9 +436,9 @@ public class InterleavedSearchInvokerTest {
};
}
- private static Coverage createCoverage(int docs, int activeDocs, int soonActiveDocs, int nodes, int nodesTried, int degradedReason) {
+ private static Coverage createCoverage(int docs, int activeDocs, int targetActiveDocs, int nodes, int nodesTried, int degradedReason) {
Coverage coverage = new Coverage(docs, activeDocs, nodes);
- coverage.setTargetActive(soonActiveDocs);
+ coverage.setTargetActive(targetActiveDocs);
coverage.setNodesTried(nodesTried);
coverage.setDegradedReason(degradedReason);
return coverage;
diff --git a/container-search/src/test/java/com/yahoo/search/dispatch/searchcluster/SearchClusterTest.java b/container-search/src/test/java/com/yahoo/search/dispatch/searchcluster/SearchClusterTest.java
index 473b24af19f..6c46b2a492f 100644
--- a/container-search/src/test/java/com/yahoo/search/dispatch/searchcluster/SearchClusterTest.java
+++ b/container-search/src/test/java/com/yahoo/search/dispatch/searchcluster/SearchClusterTest.java
@@ -124,7 +124,7 @@ public class SearchClusterTest {
int docs = numDocs.get();
pongHandler.handle ((docs < 0)
? new Pong(ErrorMessage.createBackendCommunicationError("Negative numDocs = " + docs))
- : new Pong(docs));
+ : new Pong(docs, docs));
pingCount.incrementAndGet();
}
}
diff --git a/container-search/src/test/java/com/yahoo/search/result/test/CoverageTestCase.java b/container-search/src/test/java/com/yahoo/search/result/test/CoverageTestCase.java
index 787880f6a4e..f59a7a94f0a 100644
--- a/container-search/src/test/java/com/yahoo/search/result/test/CoverageTestCase.java
+++ b/container-search/src/test/java/com/yahoo/search/result/test/CoverageTestCase.java
@@ -74,7 +74,7 @@ public class CoverageTestCase {
com.yahoo.container.logging.Coverage lc = c.toLoggingCoverage();
assertEquals(lc.getDocs(), c.getDocs());
assertEquals(lc.getActive(), c.getActive());
- assertEquals(lc.getSoonActive(), c.getTargetActive());
+ assertEquals(lc.getTargetActive(), c.getTargetActive());
assertEquals(lc.getResultPercentage(), c.getResultPercentage());
assertEquals(lc.isDegraded(), c.isDegraded());
assertEquals(lc.isDegradedByNonIdealState(), c.isDegradedByNonIdealState());