Daniela, You may need to look into org.apache.dubbo.rpc.cluster.loadbalance.AbstractLoadBalance#getWeight and org.apache.dubbo.rpc.filter.ActiveLimitFilter#invoke to understand when and how 'weight' and 'actives' are used.
I notice that it is 'active' instead of 'actives' is defined in URL, and I believe it is a typo. You may consider to file an issue to track it. Thanks, -Ian. On Thu, Apr 4, 2019 at 11:06 AM Daniela Morais <[email protected]> wrote: > I'm interested in working on developing a new load balancer (DUBBO-34) for > GSoC. I'll send my draft after discuss and I really appreciate reviewers > and suggestions (https://issues.apache.org/jira/browse/DUBBO-34 < > https://issues.apache.org/jira/browse/DUBBO-34>). > > I've been reading the unit test for LeastActiveLoadBalance (method > testSelectByWeight) and in JUnit, the list of invokers contains a query > param called "active". > > Code: > URL url1 = URL.valueOf("test1://127.0.0.1:11/DemoService?weight=1&active=0 > "); > URL url2 = URL.valueOf("test2:// > 127.0.0.1:12/DemoService?weight=9&active=0"); > URL url3 = URL.valueOf("test3:// > 127.0.0.1:13/DemoService?weight=6&active=1"); > URL urlTmp = URL.valueOf("test4:// > 127.0.0.1:9999/DemoService?weight=11&active=0"); > > But after that RpcStatus.getStatus(..) is called (method before() in > LoadBalanceBaseTest.java) adding new data in METHOD_STATISTICS. > > Seems like those query params aren't being used. Is there any reason for > adding "actives" as a query param in those URLs? > > Thanks > -- > > Daniela Morais > Computer Science student at University Of Campinas > danielammorais.com <http://www.danielammorais.com> > >
