aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config-model-api/src/main/java/com/yahoo/config/model/api/ConfigChangeReindexAction.java6
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/VespaReindexAction.java3
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/configchange/ReindexActions.java2
3 files changed, 4 insertions, 7 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/ConfigChangeReindexAction.java b/config-model-api/src/main/java/com/yahoo/config/model/api/ConfigChangeReindexAction.java
index d8ca3369874..085638e31ff 100644
--- a/config-model-api/src/main/java/com/yahoo/config/model/api/ConfigChangeReindexAction.java
+++ b/config-model-api/src/main/java/com/yahoo/config/model/api/ConfigChangeReindexAction.java
@@ -1,8 +1,6 @@
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.model.api;
-import java.util.Optional;
-
/**
* Represents an action to re-index a document type in order to handle a config change.
*
@@ -15,6 +13,6 @@ public interface ConfigChangeReindexAction extends ConfigChangeAction {
/** @return name identifying this kind of change, used to identify names which should be allowed */
String name();
- /** @return name of the document type that must be re-indexed, or empty if all document types */
- Optional<String> getDocumentType();
+ /** @return name of the document type that must be re-indexed */
+ String getDocumentType();
}
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/VespaReindexAction.java b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/VespaReindexAction.java
index 9ceded4d746..f10802afc31 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/VespaReindexAction.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/VespaReindexAction.java
@@ -9,7 +9,6 @@ import com.yahoo.config.provision.ClusterSpec;
import java.time.Instant;
import java.util.List;
import java.util.Objects;
-import java.util.Optional;
/**
* Represents an action to re-index a document type in order to handle a config change.
@@ -51,7 +50,7 @@ public class VespaReindexAction extends VespaConfigChangeAction implements Confi
}
@Override public String name() { return name; }
- @Override public Optional<String> getDocumentType() { return Optional.ofNullable(documentType); }
+ @Override public String getDocumentType() { return documentType; }
@Override public boolean allowed() { return allowed; }
@Override public boolean ignoreForInternalRedeploy() { return false; }
@Override public String toString() { return super.toString() + ", documentType='" + documentType + "'"; }
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/configchange/ReindexActions.java b/configserver/src/main/java/com/yahoo/vespa/config/server/configchange/ReindexActions.java
index ae31e375496..e328f9595b7 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/configchange/ReindexActions.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/configchange/ReindexActions.java
@@ -27,7 +27,7 @@ public class ReindexActions {
if (action.getType().equals(ConfigChangeAction.Type.REINDEX)) {
ConfigChangeReindexAction reindexChange = (ConfigChangeReindexAction) action;
for (ServiceInfo service : reindexChange.getServices()) {
- addEntry(reindexChange.name(), reindexChange.allowed(), reindexChange.getDocumentType().orElse(null), service).
+ addEntry(reindexChange.name(), reindexChange.allowed(), reindexChange.getDocumentType(), service).
addService(service).
addMessage(action.getMessage());
}