You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2021/05/27 07:02:36 UTC

[servicecomb-java-chassis] branch master updated: [#2272]fix problem of grey release not use latest version when version changed(#2384)

This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
     new 3138a19  [#2272]fix problem of grey release not use latest version when version changed(#2384)
3138a19 is described below

commit 3138a197167464f8685d72f1c86e4f9c93b336b2
Author: wxkwxkwxk1231 <ka...@protonmail.com>
AuthorDate: Thu May 27 15:02:27 2021 +0800

    [#2272]fix problem of grey release not use latest version when version changed(#2384)
---
 .../router/distribute/AbstractRouterDistributor.java           | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/handlers/handler-router/src/main/java/org/apache/servicecomb/router/distribute/AbstractRouterDistributor.java b/handlers/handler-router/src/main/java/org/apache/servicecomb/router/distribute/AbstractRouterDistributor.java
index 64d957d..9a86013 100644
--- a/handlers/handler-router/src/main/java/org/apache/servicecomb/router/distribute/AbstractRouterDistributor.java
+++ b/handlers/handler-router/src/main/java/org/apache/servicecomb/router/distribute/AbstractRouterDistributor.java
@@ -16,14 +16,15 @@
  */
 package org.apache.servicecomb.router.distribute;
 
-import com.netflix.loadbalancer.Server;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.function.Function;
 import java.util.stream.Collectors;
+
 import org.apache.servicecomb.router.cache.RouterRuleCache;
+import org.apache.servicecomb.router.custom.MicroserviceCache;
 import org.apache.servicecomb.router.model.PolicyRuleItem;
 import org.apache.servicecomb.router.model.RouteItem;
 import org.apache.servicecomb.router.model.TagItem;
@@ -32,6 +33,10 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.util.CollectionUtils;
 
+import com.netflix.loadbalancer.Server;
+
+import io.vertx.ext.web.Route;
+
 /**
  * @Author GuoYl123
  * @Date 2019/10/17
@@ -140,9 +145,6 @@ public abstract class AbstractRouterDistributor<T extends Server, E> implements
 
 
   public void initLatestVersion(String serviceName, List<T> list) {
-    if (RouterRuleCache.getServiceInfoCacheMap().get(serviceName).getLatestVersionTag() != null) {
-      return;
-    }
     String latestVersion = null;
     for (T server : list) {
       E ms = getIns.apply(server);