wujimin commented on a change in pull request #883: [SBC-870]refactor to using
custom RuleExt, not using Robin IRule.
URL:
https://github.com/apache/incubator-servicecomb-java-chassis/pull/883#discussion_r212785082
##########
File path:
handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java
##########
@@ -148,16 +146,13 @@ public LoadbalanceHandler() {
@Override
public void handle(Invocation invocation, AsyncResponse asyncResp) throws
Exception {
- String policy =
Configuration.INSTANCE.getPolicy(invocation.getMicroserviceName());
String strategy =
Configuration.INSTANCE.getRuleStrategyName(invocation.getMicroserviceName());
- boolean isRuleNotChanged = isEqual(policy, this.policy) &&
isEqual(strategy, this.strategy);
- if (!isRuleNotChanged) {
+ if (!isEqual(strategy, this.strategy)) {
Review comment:
it's better to check if customers being using old policy configuration, and
tell them how to switch to new mechanism
check can be done when init, not when handle
currently maybe init method not invoked.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services