diff options
author | Harald Musum <musum@verizonmedia.com> | 2020-06-03 12:40:43 +0200 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2020-06-03 12:40:43 +0200 |
commit | ba72113e77ce2cc07c782c085e468cd038bb214b (patch) | |
tree | 83a4346050cd13434a3a1c79aee24ec2cc4ea214 /configserver | |
parent | 0929684eb4a265bed96c20961a45477b286af032 (diff) |
Remove feature flag
Diffstat (limited to 'configserver')
2 files changed, 3 insertions, 8 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ConfigServerMaintenance.java b/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ConfigServerMaintenance.java index 502cf280e60..afcfe04f4ac 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ConfigServerMaintenance.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ConfigServerMaintenance.java @@ -34,7 +34,7 @@ public class ConfigServerMaintenance extends AbstractComponent { // TODO: Disabled until we have application metadata //tenantsMaintainer = new TenantsMaintainer(applicationRepository, curator, defaults.tenantsMaintainerInterval); fileDistributionMaintainer = new FileDistributionMaintainer(applicationRepository, curator, defaults.defaultInterval, configserverConfig); - sessionsMaintainer = new SessionsMaintainer(applicationRepository, curator, defaults.defaultInterval, flagSource); + sessionsMaintainer = new SessionsMaintainer(applicationRepository, curator, defaults.defaultInterval); } @Override diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/SessionsMaintainer.java b/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/SessionsMaintainer.java index 250548d5e91..4975b82a801 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/SessionsMaintainer.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/SessionsMaintainer.java @@ -4,9 +4,6 @@ package com.yahoo.vespa.config.server.maintenance; import com.yahoo.log.LogLevel; import com.yahoo.vespa.config.server.ApplicationRepository; import com.yahoo.vespa.curator.Curator; -import com.yahoo.vespa.flags.FlagSource; -import com.yahoo.vespa.flags.Flags; -import com.yahoo.vespa.flags.LongFlag; import java.time.Duration; @@ -19,14 +16,12 @@ import java.time.Duration; */ public class SessionsMaintainer extends ConfigServerMaintainer { private final boolean hostedVespa; - private final LongFlag expiryTimeFlag; - SessionsMaintainer(ApplicationRepository applicationRepository, Curator curator, Duration interval, FlagSource flagSource) { + SessionsMaintainer(ApplicationRepository applicationRepository, Curator curator, Duration interval) { // Start this maintainer immediately. It frees disk space, so if disk goes full and config server // restarts this makes sure that cleanup will happen as early as possible super(applicationRepository, curator, Duration.ZERO, interval); this.hostedVespa = applicationRepository.configserverConfig().hostedVespa(); - this.expiryTimeFlag = Flags.CONFIGSERVER_SESSIONS_EXPIRY_INTERVAL_IN_DAYS.bindTo(flagSource); } @Override @@ -36,7 +31,7 @@ public class SessionsMaintainer extends ConfigServerMaintainer { // Expired remote sessions are sessions that belong to an application that have external deployments that // are no longer active if (hostedVespa) { - Duration expiryTime = Duration.ofDays(expiryTimeFlag.value()); + Duration expiryTime = Duration.ofDays(1); int deleted = applicationRepository.deleteExpiredRemoteSessions(expiryTime); log.log(LogLevel.FINE, "Deleted " + deleted + " expired remote sessions, expiry time " + expiryTime); } |