upthewaterspout commented on a change in pull request #7478:
URL: https://github.com/apache/geode/pull/7478#discussion_r840021750
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
##########
@@ -1511,6 +1511,7 @@ private void initializeServices() {
}
} catch (Exception ex) {
logger.warn("Cache service " + service.getClass().getName() + " failed
to initialize", ex);
+ throw ex;
Review comment:
I think this is a good change, but you might want to call it out in the
commit message. With this change, if any cache service fails to start the
server will fail to start. Before it looks like we would just ignore that
service?
##########
File path:
geode-for-redis/src/main/java/org/apache/geode/redis/internal/GeodeRedisService.java
##########
@@ -83,18 +86,12 @@ public void handleEvent(ResourceEvent event, Object
resource) {
}
private void startRedisServer(InternalCache cache) {
- InternalDistributedSystem system = cache.getInternalDistributedSystem();
-
- if (system.getConfig().getRedisEnabled()) {
- int port = system.getConfig().getRedisPort();
- String bindAddress = system.getConfig().getRedisBindAddress();
- assert bindAddress != null;
-
- logger.info(
- String.format("Starting GeodeRedisServer on bind address %s on port
%s",
- bindAddress, port));
-
- redisServer = new GeodeRedisServer(bindAddress, port, cache);
+ if (configuration.isEnabled()) {
+ try {
+ redisServer = new GeodeRedisServer(configuration, cache);
+ } catch (IllegalArgumentException ex) {
+ throw new ManagementException(ex);
Review comment:
Is this the right exception to be thrown here? Why do we need to wrap
this exception in a ManagementException
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]