Run TenantsMaintainer in all zones
@@ -3,8 +3,6 @@ package com.yahoo.vespa.config.server.maintenance;
import com.yahoo.cloud.config.ConfigserverConfig;
import com.yahoo.component.AbstractComponent;
-import com.yahoo.config.provision.Environment;
-import com.yahoo.config.provision.SystemName;
import com.yahoo.vespa.config.server.ApplicationRepository;
import com.yahoo.vespa.config.server.session.FileDistributionFactory;
import com.yahoo.vespa.curator.Curator;
@@ -23,7 +21,7 @@ public class ConfigServerMaintenance extends AbstractComponent {
Curator curator,
FileDistributionFactory fileDistributionFactory) {
DefaultTimes defaults = new DefaultTimes(configserverConfig);
- tenantsMaintainer = new TenantsMaintainer(applicationRepository, curator, defaults.tenantsMaintainerInterval);
+ tenantsMaintainer = new TenantsMaintainer(applicationRepository, curator, defaults.defaultInterval);
zooKeeperDataMaintainer = new ZooKeeperDataMaintainer(applicationRepository, curator, defaults.defaultInterval);
fileDistributionMaintainer = new FileDistributionMaintainer(applicationRepository, curator, defaults.defaultInterval, configserverConfig);
}
@@ -42,18 +40,9 @@ public class ConfigServerMaintenance extends AbstractComponent {
private static class DefaultTimes {
private final Duration defaultInterval;
- private final Duration tenantsMaintainerInterval;
DefaultTimes(ConfigserverConfig configserverConfig) {
- boolean isCd = configserverConfig.system().equals(SystemName.cd.name());
- boolean isTest = Environment.from(configserverConfig.environment()).isTest();
-
this.defaultInterval = Duration.ofMinutes(configserverConfig.maintainerIntervalMinutes());
- // TODO: Want job control or feature flag to control when to run this, for now use a very
- // long interval to avoid running the maintainer
- this.tenantsMaintainerInterval = isCd || isTest || configserverConfig.region().equals("us-central-1")
- ? defaultInterval
- : Duration.ofMinutes(configserverConfig.tenantsMaintainerIntervalMinutes());
}
}
