[
https://issues.apache.org/jira/browse/SCB-1576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
liubao closed SCB-1576.
-----------------------
Resolution: Fixed
> SerivceCombServerStatus has performance problem
> -----------------------------------------------
>
> Key: SCB-1576
> URL: https://issues.apache.org/jira/browse/SCB-1576
> Project: Apache ServiceComb
> Issue Type: Improvement
> Components: Java-Chassis
> Affects Versions: java-chassis-1.2.1
> Reporter: jeho0815
> Assignee: jeho0815
> Priority: Major
>
> if server has many instance, the
> ServiceCombLoadBalancerStats#getServiceCombServer iterate all the instances
> cache each invoke
> {code:java}
> public ServiceCombServer getServiceCombServer(MicroserviceInstance instance) {
> for (ServiceCombServer server : serverStatsCache.asMap().keySet()) {
> if (server.getInstance().equals(instance)) {
> return server;
> }
> }
> return null;
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)