aboutsummaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-11-18 11:02:22 +0100
committerJon Marius Venstad <venstad@gmail.com>2020-11-18 11:02:22 +0100
commit6e419f5da9a464be214ce8cb0a95c8d5d0f76c31 (patch)
tree00dbf28a40bbae988b6dedc2c85e1bf70aacbceb /configserver
parent8030f2330271e7a4fac732dfb039b326142eef4c (diff)
Ensure activated applications have a reindexing status
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/deploy/Deployment.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/Deployment.java b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/Deployment.java
index 08cb5e9c550..d347a19a6db 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/Deployment.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/Deployment.java
@@ -120,12 +120,10 @@ public class Deployment implements com.yahoo.config.provision.Deployment {
activation.sourceSessionId().stream().mapToObj(id -> ". Based on session " + id).findFirst().orElse("") +
". File references: " + applicationRepository.getFileReferences(applicationId));
- if (configChangeActions != null) {
- if (provisioner.isPresent())
- restartServices(applicationId);
+ if (provisioner.isPresent() && configChangeActions != null)
+ restartServices(applicationId);
- storeReindexing(applicationId, session.getMetaData().getGeneration());
- }
+ storeReindexing(applicationId, session.getMetaData().getGeneration());
return session.getMetaData().getGeneration();
}
@@ -151,8 +149,9 @@ public class Deployment implements com.yahoo.config.provision.Deployment {
private void storeReindexing(ApplicationId applicationId, long requiredSession) {
applicationRepository.modifyReindexing(applicationId, reindexing -> {
- for (ReindexActions.Entry entry : configChangeActions.getReindexActions().getEntries())
- reindexing = reindexing.withPending(entry.getClusterName(), entry.getDocumentType(), requiredSession);
+ if (configChangeActions != null)
+ for (ReindexActions.Entry entry : configChangeActions.getReindexActions().getEntries())
+ reindexing = reindexing.withPending(entry.getClusterName(), entry.getDocumentType(), requiredSession);
return reindexing;
});