zrlw commented on code in PR #15639: URL: https://github.com/apache/dubbo/pull/15639#discussion_r2302351134
########## dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultApplicationDeployer.java: ########## @@ -890,19 +901,17 @@ private DynamicConfiguration prepareEnvironment(ConfigCenterConfig configCenter) DynamicConfiguration dynamicConfiguration; try { dynamicConfiguration = getDynamicConfiguration(configCenter.toUrl()); - } catch (Exception e) { - if (!configCenter.isCheck()) { + if (!dynamicConfiguration.isAvailable()) { logger.warn( - CONFIG_FAILED_INIT_CONFIG_CENTER, - "", - "", - "The configuration center failed to initialize", - e); - configCenter.setInitialized(false); - return null; - } else { - throw new IllegalStateException(e); + CONFIG_FAILED_INIT_CONFIG_CENTER, "", "", "The configuration center failed to initialize"); + if (!configCenter.isCheck()) { + configCenter.setInitialized(true); Review Comment: ``` try { dynamicConfiguration = getDynamicConfiguration(configCenter.toUrl()); if (!dynamicConfiguration.isAvailable()) { logger.warn( CONFIG_FAILED_INIT_CONFIG_CENTER, "", "", "The configuration center failed to initialize"); if (!configCenter.isCheck()) { configCenter.setInitialized(true); // TODO should it `updateExternalConfigMap` when the connection recovery return dynamicConfiguration; } } } catch (Exception e) { throw new IllegalStateException(e); } ``` it seemed you don't throw exception when check is true. -- 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: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org