summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-06-28 21:30:11 +0200
committerJon Bratseth <bratseth@oath.com>2018-06-28 21:30:11 +0200
commit14e13623fe3dbaaefdae61daacd34a974efbb14f (patch)
tree43432841b12de4b8dc0f5983cacbc7f06d02764e /configserver
parentd9be160582d3488c944907f6958e09b9ab1555b8 (diff)
Application deployments inhibits periodic redeploys for a while
Why? 1) Too many redeploys are unecessary and have a cost 2) If restartOnDeploy is turned on, we may end up not able to respect it to make sure config is actually deployed if a periodic redeploy follows right after an application deploy.
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
index 581c6e0394e..2562ae4df50 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java
@@ -232,6 +232,15 @@ public class ApplicationRepository implements com.yahoo.config.provision.Deploye
false /* don't validate as this is already deployed */, version));
}
+ @Override
+ public Optional<Instant> lastDeployTime(ApplicationId application) {
+ Tenant tenant = tenantRepository.getTenant(application.tenant());
+ if (tenant == null) return Optional.empty();
+ LocalSession activeSession = getActiveSession(tenant, application);
+ if (activeSession == null) return Optional.empty();
+ return Optional.of(Instant.ofEpochSecond(activeSession.getCreateTime()));
+ }
+
public ApplicationId activate(Tenant tenant,
long sessionId,
TimeoutBudget timeoutBudget,