diff options
author | Harald Musum <musum@verizonmedia.com> | 2021-01-22 14:37:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-22 14:37:30 +0100 |
commit | fb87d18e13a000f1ecfc3efb2209b1e2253b1d06 (patch) | |
tree | 26fdfa19565bf6e2a5b6dc76e821cbc4632edd5a /configserver | |
parent | 33e3448242a228348859caff51fa49f635192f59 (diff) |
Revert "Do not synchronize on method used to bootstrap tenants [run-systemtest]"
Diffstat (limited to 'configserver')
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantRepository.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantRepository.java b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantRepository.java index 0d818204fd5..15f30dc6ece 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantRepository.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/TenantRepository.java @@ -172,7 +172,7 @@ public class TenantRepository { this.hostRegistry = hostRegistry; this.configserverConfig = configserverConfig; this.bootstrapExecutor = Executors.newFixedThreadPool(configserverConfig.numParallelTenantLoaders(), - new DaemonThreadFactory("bootstrap-tenants-")); + new DaemonThreadFactory("bootstrap tenants")); this.curator = curator; this.metrics = metrics; metricUpdater = metrics.getOrCreateMetricUpdater(Collections.emptyMap()); @@ -286,7 +286,7 @@ public class TenantRepository { } // Use when bootstrapping an existing tenant based on ZooKeeper data - protected void bootstrapTenant(TenantName tenantName) { + protected synchronized void bootstrapTenant(TenantName tenantName) { createTenant(tenantName, readCreatedTimeFromZooKeeper(tenantName)); } @@ -306,8 +306,6 @@ public class TenantRepository { return tenant; } - Instant start = Instant.now(); - log.log(Level.FINE, "Adding tenant '" + tenantName); TenantApplications applicationRepo = new TenantApplications(tenantName, curator, @@ -348,8 +346,7 @@ public class TenantRepository { modelFactoryRegistry, configDefinitionRepo, tenantListener); - log.log(Level.INFO, "Adding tenant '" + tenantName + "'" + ", created " + created + - ". Bootstrapping in " + Duration.between(start, Instant.now())); + log.log(Level.INFO, "Adding tenant '" + tenantName + "'" + ", created " + created); Tenant tenant = new Tenant(tenantName, sessionRepository, applicationRepo, applicationRepo, created); notifyNewTenant(tenant); tenants.putIfAbsent(tenantName, tenant); |