chengyouling commented on code in PR #5014:
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/5014#discussion_r2555475102


##########
service-registry/registry-service-center/src/main/java/org/apache/servicecomb/serviceregistry/refresh/ServiceRegistryAddressManager.java:
##########
@@ -54,4 +63,24 @@ public IpPort transformIpPort(String address) {
   public void onRefreshEndpointEvent(RefreshEndpointEvent event) {
     refreshEndpoint(event, RefreshEndpointEvent.SERVICE_CENTER_NAME);
   }
+
+  public void constructAffinityAddress(List<String> addresses, String 
ownRegion, String ownAvailableZone) {
+    boolean isAffinityAddress = addresses.stream().anyMatch(addr -> 
addr.contains(ZONE) || addr.contains(REGION));
+    if (!isAffinityAddress || (StringUtils.isEmpty(ownRegion) && 
StringUtils.isEmpty(ownAvailableZone))) {
+      return;
+    }
+    String regionAndZone = "region=" + ownRegion + "&availableZone=" + 
ownAvailableZone;

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to