summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-04-14 14:05:23 +0200
committerHarald Musum <musum@verizonmedia.com>2020-04-14 14:05:23 +0200
commitfad6dddafe0b638ef6c2112ae842bca757b55098 (patch)
tree52f786eaee7a7fcf8773329685d2d10ac38c74f3 /configserver
parent3988e7df74f7ca9e8496f55037e3fbe36f6577d2 (diff)
Log session that new session is based on if possible
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/deploy/Deployment.java5
1 files changed, 4 insertions, 1 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 b3c5b38b9ba..2c5c37c3f0b 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
@@ -131,10 +131,12 @@ public class Deployment implements com.yahoo.config.provision.Deployment {
TimeoutBudget timeoutBudget = new TimeoutBudget(clock, timeout);
ApplicationId applicationId = session.getApplicationId();
+ LocalSession currentActiveSession;
try (Lock lock = tenant.getApplicationRepo().lock(applicationId)) {
validateSessionStatus(session);
NestedTransaction transaction = new NestedTransaction();
- transaction.add(deactivateCurrentActivateNew(applicationRepository.getActiveSession(applicationId), session, ignoreSessionStaleFailure));
+ currentActiveSession = applicationRepository.getActiveSession(applicationId);
+ transaction.add(deactivateCurrentActivateNew(currentActiveSession, session, ignoreSessionStaleFailure));
hostProvisioner.ifPresent(provisioner -> provisioner.activate(transaction, applicationId, session.getAllocatedHosts().getHosts()));
transaction.commit();
}
@@ -151,6 +153,7 @@ public class Deployment implements com.yahoo.config.provision.Deployment {
" activated successfully using " +
(hostProvisioner.isPresent() ? hostProvisioner.get().getClass().getSimpleName() : "no host provisioner") +
". Config generation " + session.getMetaData().getGeneration() +
+ (currentActiveSession != null ? ". Activated session based on previous active session " + currentActiveSession.getSessionId() : "") +
". File references used: " + applicationRepository.getFileReferences(applicationId));
}
}