chickenlj commented on code in PR #10006:
URL: https://github.com/apache/dubbo/pull/10006#discussion_r867322567


##########
dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/model/MigrationRule.java:
##########
@@ -180,13 +181,21 @@ public MigrationStep getStep(URL consumerURL) {
             // initial step : APPLICATION_FIRST
             step = MigrationStep.APPLICATION_FIRST;
             step = Enum.valueOf(MigrationStep.class,
-                consumerURL.getParameter(MIGRATION_STEP_KEY,
-                    
ConfigurationUtils.getCachedDynamicProperty(consumerURL.getScopeModel(), 
DUBBO_SERVICEDISCOVERY_MIGRATION, step.name())));
+                consumerURL.getParameter(MIGRATION_STEP_KEY, 
getDefaultStep(consumerURL, step.name())));
         }
 
         return step;
     }
 
+    private String getDefaultStep(URL consumerURL, String defaultStep) {
+        String globalDefaultStep = 
ConfigurationUtils.getCachedDynamicProperty(consumerURL.getScopeModel(), 
DUBBO_SERVICEDISCOVERY_MIGRATION, null);
+        if (StringUtils.isEmpty(globalDefaultStep)) {
+            // check 'dubbo.application.service-discovery.step' for 
compatibility
+            globalDefaultStep = 
ConfigurationUtils.getCachedDynamicProperty(consumerURL.getScopeModel(), 
"dubbo.application.service-discovery.step", defaultStep);

Review Comment:
   Sure, I will fix it now
   



-- 
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]

Reply via email to