zrlw commented on a change in pull request #9015:
URL: https://github.com/apache/dubbo/pull/9015#discussion_r734919912
##########
File path:
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultApplicationDeployer.java
##########
@@ -512,22 +513,23 @@ private void initMetadataService() {
* @return
*/
@Override
+ @SuppressWarnings("rawtypes")
public synchronized Future start() {
- CompletableFuture startFuture = getStartFuture();
-
- // maybe call start again after add new module, check if any new module
- boolean hasPendingModule = hasPendingModule();
-
if (isStarting()) {
- // currently is starting, maybe both start by module and
application
- // if has new modules, start them
- if (hasPendingModule) {
- startModules();
- }
+ // currently is starting.
+ // maybe first start ModuleDeployer then start DubboBootstrap,
+ // so initialize() and doStart() should support idempotent calling
+ // because we don't know whether they have been called or not.
+ // see
DubboBootstrapMultiInstanceTest#testBothStartByModuleAndByApplication
+ initialize();
+ doStart();
Review comment:
are you sure we don't need
registerShutdownHook,startConfigCenter,loadApplicationConfigs,
initModuleDeployers, startMetadataCenter, initMetadataService if starting
moduleDeployer first?
moduleDeployer1.start().get() in
DubboBootstrapMultiInstanceTest#testBothStartByModuleAndByApplication only call
DefaultApplicationDeployer#onStarting(), but onStarting() just sets
DefaultApplicationDeployer state to starting and does nothing else for
DefaultApplicationDeployer.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]