summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-05-27 07:25:33 +0200
committerHarald Musum <musum@verizonmedia.com>2020-05-27 07:25:33 +0200
commit1bd4c2c7a9b1d0f89121bfbcc20e04d5d7a19fbc (patch)
treea395b9d2499645e1ef19f3a58f9140a3673714b7
parent7765b1862f45861261b72fe0d95cfda1ca800005 (diff)
Remove check for throwIfActiveSessionCannotBeLoaded
Value has been true for many years, no known usage, remove in Vespa 8
-rw-r--r--configdefinitions/src/vespa/configserver.def3
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/session/RemoteSessionRepo.java24
2 files changed, 11 insertions, 16 deletions
diff --git a/configdefinitions/src/vespa/configserver.def b/configdefinitions/src/vespa/configserver.def
index e6fef0c454b..88a637e3ecb 100644
--- a/configdefinitions/src/vespa/configserver.def
+++ b/configdefinitions/src/vespa/configserver.def
@@ -64,6 +64,9 @@ sleepTimeWhenRedeployingFails long default=30
# Features (to be overridden in configserver-config.xml if needed)
buildMinimalSetOfConfigModels bool default=true
throwIfBootstrappingTenantRepoFails bool default=true
+
+# Unused, remove in Vespa 8
throwIfActiveSessionCannotBeLoaded bool default=true
+
canReturnEmptySentinelConfig bool default=false
serverNodeType enum {config, controller} default=config
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/session/RemoteSessionRepo.java b/configserver/src/main/java/com/yahoo/vespa/config/server/session/RemoteSessionRepo.java
index c27b7c6802b..859f9af5144 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/session/RemoteSessionRepo.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/session/RemoteSessionRepo.java
@@ -30,7 +30,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executor;
-import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
@@ -46,7 +45,6 @@ public class RemoteSessionRepo extends SessionRepo<RemoteSession> {
private static final Logger log = Logger.getLogger(RemoteSessionRepo.class.getName());
- private final GlobalComponentRegistry componentRegistry;
private final Curator curator;
private final Path sessionsPath;
private final RemoteSessionFactory remoteSessionFactory;
@@ -63,7 +61,6 @@ public class RemoteSessionRepo extends SessionRepo<RemoteSession> {
ReloadHandler reloadHandler,
TenantName tenantName,
TenantApplications applicationRepo) {
- this.componentRegistry = componentRegistry;
this.curator = componentRegistry.getCurator();
this.sessionsPath = TenantRepository.getSessionsPath(tenantName);
this.applicationRepo = applicationRepo;
@@ -142,19 +139,14 @@ public class RemoteSessionRepo extends SessionRepo<RemoteSession> {
*/
private void sessionAdded(long sessionId) {
log.log(Level.FINE, () -> "Adding session to RemoteSessionRepo: " + sessionId);
- try {
- RemoteSession session = remoteSessionFactory.createSession(sessionId);
- Path sessionPath = sessionsPath.append(String.valueOf(sessionId));
- Curator.FileCache fileCache = curator.createFileCache(sessionPath.append(ConfigCurator.SESSIONSTATE_ZK_SUBPATH).getAbsolute(), false);
- fileCache.addListener(this::nodeChanged);
- loadSessionIfActive(session);
- addSession(session);
- metrics.incAddedSessions();
- sessionStateWatchers.put(sessionId, new RemoteSessionStateWatcher(fileCache, reloadHandler, session, metrics, zkWatcherExecutor));
- } catch (Exception e) {
- if (componentRegistry.getConfigserverConfig().throwIfActiveSessionCannotBeLoaded()) throw e;
- log.log(Level.WARNING, "Failed loading session " + sessionId + ": No config for this session can be served", e);
- }
+ RemoteSession session = remoteSessionFactory.createSession(sessionId);
+ Path sessionPath = sessionsPath.append(String.valueOf(sessionId));
+ Curator.FileCache fileCache = curator.createFileCache(sessionPath.append(ConfigCurator.SESSIONSTATE_ZK_SUBPATH).getAbsolute(), false);
+ fileCache.addListener(this::nodeChanged);
+ loadSessionIfActive(session);
+ addSession(session);
+ metrics.incAddedSessions();
+ sessionStateWatchers.put(sessionId, new RemoteSessionStateWatcher(fileCache, reloadHandler, session, metrics, zkWatcherExecutor));
}
private void sessionRemoved(long sessionId) {