aboutsummaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorArne Juul <arnej@yahooinc.com>2024-01-17 09:22:20 +0000
committerArne Juul <arnej@yahooinc.com>2024-01-17 09:22:20 +0000
commit364e55663c956868ea0979e9ecd76bb572e8a45f (patch)
tree5c574e3485004c0eea71faf91fce9350075d1d91 /config-model
parentd5bd82ab357743820e5ed4cd6d2d8e3aa498b02f (diff)
construct DocumentDatabase up-front
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java
index f25ca7e4452..44551965a8c 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java
@@ -42,6 +42,7 @@ public class StreamingSearchCluster extends SearchCluster implements
private final AttributesProducer attributesConfig;
private final String docTypeName;
private DerivedConfiguration derivedConfig = null;
+ private DocumentDatabase derivedDb = null;
public StreamingSearchCluster(TreeConfigProducer<AnyConfigProducer> parent,
String clusterName,
@@ -85,15 +86,15 @@ public class StreamingSearchCluster extends SearchCluster implements
throw new IllegalArgumentException("Document type name '" + docTypeName +
"' must be the same as the schema name '" + schema.getName() + "'");
this.derivedConfig = new DerivedConfiguration(schema, deployState, true);
+ this.derivedDb = new DocumentDatabase(this, docTypeName, this.derivedConfig);
}
@Override
public List<DocumentDatabase> getDocumentDbs() {
- if (derived() == null) {
+ if (derivedDb == null) {
throw new IllegalArgumentException("missing derivedConfig");
}
- var db = new DocumentDatabase(this, docTypeName, derived());
- return List.of(db);
+ return List.of(derivedDb);
}
@Override