diff options
author | Harald Musum <musum@oath.com> | 2017-10-27 13:59:15 +0200 |
---|---|---|
committer | Harald Musum <musum@oath.com> | 2017-10-27 13:59:15 +0200 |
commit | e138c97d1aa92e75a7434e8f8aaeeff7f91e2f08 (patch) | |
tree | 24fb2e39332d254e57d0a861173433f4843e8884 | |
parent | 9cdfac9530b95bb1164e3e14f878aba494dd3e8b (diff) |
CHeck for removed applications for any event
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/application/ZKTenantApplications.java | 9 |
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); } |