ASF GitHub Bot commented on SCB-706:

liubao68 commented on a change in pull request #803:  [SCB-706]change filters 
to discovery filters and support invocation based filters

 File path: 
 @@ -34,23 +36,36 @@
 public class SimpleTransactionControlFilter extends TransactionControlFilter {
-  public List<Server> getFilteredListOfServers(List<Server> servers) {
+  public boolean enabled() {
+    return DynamicPropertyFactory.getInstance()
+        .getBooleanProperty("servicecomb.loadbalance.filter.simple.enabled", 
+  }
+  @Override
+  public int getOrder() {
+    return 200;
+  }
+  @Override
+  public List<Server> getFilteredListOfServers(List<Server> servers, 
Invocation invocation) {
     List<Server> filteredServers = new ArrayList<>();
     Map<String, String> filterOptions =
 Review comment:
   This filter leaves for compatible, maybe we need provide a new one in 
future. So I leave it here but not remove it. We can think about your idea in 
future when needed. 

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:

> refactor loadbalance filters logic to support invocation based filter
> ---------------------------------------------------------------------
>                 Key: SCB-706
>                 URL: https://issues.apache.org/jira/browse/SCB-706
>             Project: Apache ServiceComb
>          Issue Type: Improvement
>            Reporter: liubao
>            Assignee: liubao
>            Priority: Major
> Why we do this?
>  # When implement invocation based filter, e.g. darklaunch deployment, we 
> need to filter servers based on invocation parameters. But now, we create a 
> Loadbalaner instance for each service, and Robin filter interface can not 
> pass Invocation to it. Before refactor, we doing this by ThreadLocal and 
> cache Invocation, and use in filter implementation. This is error prone and 
> users can't handle this complixity
>  # We have other improvements, e.g. SCB-700, we can do server status check, 
> and add a filter a choose from active servers. We need to consider filter 
> orders and other feature, current implementation not satisfy this.
>  # We want to make loadbalance code handy by remove some compatible fixes. 

This message was sent by Atlassian JIRA

Reply via email to