From 14e13623fe3dbaaefdae61daacd34a974efbb14f Mon Sep 17 00:00:00 2001 From: Jon Bratseth Date: Thu, 28 Jun 2018 21:30:11 +0200 Subject: 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. --- .../com/yahoo/vespa/config/server/ApplicationRepository.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configserver') 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 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, -- cgit v1.2.3