Hi Team, 

In org.apache.servicecomb.serviceregistry.client.IpPortManager, we used 
List<IpPort&gt; and List<CacheEndpoint&gt; to handle ipPort:
- List<IpPort&gt; is used to maintain default ip ports from microservice.yaml;
- List<CacheEndpoint&gt; is used to maintain CacheEndpoints from 
instanceManager.


I have following questions about that:
1. The only usage of CacheEndpoint here is to get IpPort;
2. CacheEndpoint list and IpPort list may have the same ip port which is 
redundant, and no any deduplication in code. Which will lead to the 
maxRetryTimes (size of List<IpPort&gt; add size of List<CacheEndpoint&gt;) 
exceed actual SC ip port count;
3. Two different lists with different data types is inconvenient to maintain.


Maybe it is better to maintain one ipPort list containing both of the above.

Reply via email to