diff options
author | HÃ¥kon Hallingstad <hakon@verizonmedia.com> | 2020-06-05 09:02:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-05 09:02:17 +0200 |
commit | 6430b1be86a0f1450eb2bfb4ebcdd381cc64315f (patch) | |
tree | ddb7644773c5d5cc181bae26104093d29b93d6f0 | |
parent | 7cbc790d3d4aefe89e43cf5a39ec2916d8432eb1 (diff) | |
parent | cb1e75be1ad9ceb6e6dd530dc5287a53cb5a3db3 (diff) |
Merge pull request #13491 from vespa-engine/hmusum/remove-unused-flag-5
Stop using flag and remove it
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/session/LocalSessionRepo.java | 6 | ||||
-rw-r--r-- | flags/src/main/java/com/yahoo/vespa/flags/Flags.java | 5 |
2 files changed, 1 insertions, 10 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); diff --git a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java index efe86bb6d55..a9ded0f5fd2 100644 --- a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java +++ b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java @@ -246,11 +246,6 @@ public class Flags { "Takes effect on next application redeploy", APPLICATION_ID); - public static final UnboundLongFlag CONFIGSERVER_LOCAL_SESSIONS_EXPIRY_INTERVAL_IN_DAYS = defineLongFlag( - "configserver-local-sessions-expiry-interval-in-days", 1, - "Expiry time for expired local sessions in config server", - "Takes effect on next run of config server maintainer SessionsMaintainer"); - public static final UnboundBooleanFlag USE_CLOUD_INIT_FORMAT = defineFeatureFlag( "use-cloud-init", false, "Use the cloud-init format when provisioning hosts", |