summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorValerij Fredriksen <valerij92@gmail.com>2021-01-21 20:02:27 +0100
committerValerij Fredriksen <valerij92@gmail.com>2021-01-21 20:02:27 +0100
commit006f2ecfc15adf1e57e61cb99ca82aae0adb3a71 (patch)
tree162bb0adbdee0b7a6a7f7b6f20a7c7efcfb3e8cf /configserver
parentaaf6df2350cf41072a6d5fae1a04b72c8869a4f1 (diff)
Create new transaction for each check
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/deploy/Deployment.java4
1 files changed, 2 insertions, 2 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 56a02f8dd8c..ff2bbc12e29 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
@@ -232,8 +232,7 @@ public class Deployment implements com.yahoo.config.provision.Deployment {
Set<HostSpec> preparedHosts = session.getAllocatedHosts().getHosts();
ActivationContext context = new ActivationContext(session.getSessionId());
- ApplicationTransaction transaction = new ApplicationTransaction(
- new ProvisionLock(session.getApplicationId(), () -> {}), new NestedTransaction());
+ ProvisionLock lock = new ProvisionLock(session.getApplicationId(), () -> {});
AtomicReference<TransientException> lastException = new AtomicReference<>();
while (true) {
@@ -243,6 +242,7 @@ public class Deployment implements com.yahoo.config.provision.Deployment {
try {
// Call to activate to make sure that everything is ready, but do not commit the transaction
+ ApplicationTransaction transaction = new ApplicationTransaction(lock, new NestedTransaction());
provisioner.get().activate(preparedHosts, context, transaction);
return;
} catch (TransientException e) {