RainYuY commented on code in PR #15767:
URL: https://github.com/apache/dubbo/pull/15767#discussion_r2534133286


##########
dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/affinity/config/AffinityListenableStateRouter.java:
##########
@@ -53,15 +53,14 @@ public abstract class AffinityListenableStateRouter<T> 
extends AbstractStateRout
     private volatile AffinityStateRouter<T> affinityRouter;
     private final String ruleKey;
 
-    public AffinityListenableStateRouter(URL url, String ruleKey) {
+    protected AffinityListenableStateRouter(URL url, String ruleKey) {
         super(url);
         this.setForce(false);
-        this.init(ruleKey);

Review Comment:
   why not use the same style like AffinityStateRouter.java, I don't think init 
at AffinityServiceStateRouter is a better way....



##########
dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/affinity/config/AffinityListenableStateRouter.java:
##########
@@ -85,8 +84,12 @@ public synchronized void process(ConfigChangedEvent event) {
                         e);
             }
         }
+
+        onConfigChange(event);

Review Comment:
   why?



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