summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Musum <musum@yahoo-inc.com>2017-10-27 15:17:16 +0200
committerGitHub <noreply@github.com>2017-10-27 15:17:16 +0200
commit88b7039c442a02ec2635024a375ed3535f91d8aa (patch)
tree3f7308104d04c8818658c60ea592a6e918870f1c
parent513bde8cc84219ae1f4d3637b8479d220f874ebe (diff)
parente138c97d1aa92e75a7434e8f8aaeeff7f91e2f08 (diff)
Merge pull request #3924 from vespa-engine/hmusum/check-for-removed-applications-for-all-events
Check for removed applications for any event
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/application/ZKTenantApplications.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/application/ZKTenantApplications.java b/configserver/src/main/java/com/yahoo/vespa/config/server/application/ZKTenantApplications.java
index a7c12993700..648e6bb7180 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/application/ZKTenantApplications.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/application/ZKTenantApplications.java
@@ -23,7 +23,6 @@ import java.util.List;
import java.util.Optional;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
-import java.util.logging.Level;
import java.util.logging.Logger;
/**
@@ -135,11 +134,11 @@ public class ZKTenantApplications implements TenantApplications, PathChildrenCac
// do nothing, application just got redeployed
break;
default:
- // We don't know if applications have been added or removed so possibly need to remove some of them
- // (new applications are not added here)
- removeApplications(event.getType());
break;
}
+ // We might have lost events and might need to remove applications (new applications are
+ // not added by listening for events here, they are added when session is added, see RemoteSessionRepo)
+ removeApplications(event.getType());
}
private void applicationRemoved(ApplicationId applicationId) {
@@ -153,7 +152,7 @@ public class ZKTenantApplications implements TenantApplications, PathChildrenCac
private void removeApplications(PathChildrenCacheEvent.Type eventType) {
ImmutableSet<ApplicationId> activeApplications = ImmutableSet.copyOf(listApplications());
- log.log(Level.INFO, "Got " + eventType + " event for tenant '" + tenant +
+ log.log(LogLevel.DEBUG, "Got " + eventType + " event for tenant '" + tenant +
"', removing applications except these active applications: " + activeApplications);
reloadHandler.removeApplicationsExcept(activeApplications);
}