diff options
author | Harald Musum <musum@verizonmedia.com> | 2020-06-05 07:39:00 +0200 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2020-06-05 07:39:00 +0200 |
commit | cb1e75be1ad9ceb6e6dd530dc5287a53cb5a3db3 (patch) | |
tree | 376337220edb8ee53fb81a1caafd4893ac288334 /configserver | |
parent | f489483457969155f3b7483b3a865f131d556c8f (diff) |
Stop using flag and remove it
Diffstat (limited to 'configserver')
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/session/LocalSessionRepo.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/session/LocalSessionRepo.java b/configserver/src/main/java/com/yahoo/vespa/config/server/session/LocalSessionRepo.java index b6a9c8c0854..e23552dee44 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/session/LocalSessionRepo.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/session/LocalSessionRepo.java @@ -10,8 +10,6 @@ import com.yahoo.vespa.config.server.deploy.TenantFileSystemDirs; import com.yahoo.vespa.config.server.tenant.TenantRepository; import com.yahoo.vespa.config.server.zookeeper.ConfigCurator; import com.yahoo.vespa.curator.Curator; -import com.yahoo.vespa.flags.Flags; -import com.yahoo.vespa.flags.LongFlag; import java.io.File; import java.io.FilenameFilter; @@ -44,7 +42,6 @@ public class LocalSessionRepo { private final Curator curator; private final Executor zkWatcherExecutor; private final TenantFileSystemDirs tenantFileSystemDirs; - private final LongFlag expiryTimeFlag; public LocalSessionRepo(TenantName tenantName, GlobalComponentRegistry componentRegistry, SessionFactory sessionFactory) { sessionCache = new SessionCache<>(); @@ -53,7 +50,6 @@ public class LocalSessionRepo { this.sessionLifetime = Duration.ofSeconds(componentRegistry.getConfigserverConfig().sessionLifetime()); this.zkWatcherExecutor = command -> componentRegistry.getZkWatcherExecutor().execute(tenantName, command); this.tenantFileSystemDirs = new TenantFileSystemDirs(componentRegistry.getConfigServerDB(), tenantName); - this.expiryTimeFlag = Flags.CONFIGSERVER_LOCAL_SESSIONS_EXPIRY_INTERVAL_IN_DAYS.bindTo(componentRegistry.getFlagSource()); loadSessions(sessionFactory); } @@ -98,7 +94,7 @@ public class LocalSessionRepo { // Sessions with state other than ACTIVATED if (hasExpired(candidate) && !isActiveSession(candidate)) { deleteSession(candidate); - } else if (createTime.plus(Duration.ofDays(expiryTimeFlag.value())).isBefore(clock.instant())) { + } else if (createTime.plus(Duration.ofDays(1)).isBefore(clock.instant())) { // Sessions with state ACTIVATE, but which are not actually active ApplicationId applicationId = candidate.getApplicationId(); Long activeSession = activeSessions.get(applicationId); |