From ff5c010a514d612a12fd49693f7a8c8a6e717dee Mon Sep 17 00:00:00 2001 From: Eric Zhao Date: Thu, 7 Nov 2019 12:46:33 +0800 Subject: [PATCH] Fix flowId offset bug in EnvoySentinelRuleConverter Signed-off-by: Eric Zhao --- .../server/envoy/rls/rule/EnvoySentinelRuleConverter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentinel-cluster/sentinel-cluster-server-envoy-rls/src/main/java/com/alibaba/csp/sentinel/cluster/server/envoy/rls/rule/EnvoySentinelRuleConverter.java b/sentinel-cluster/sentinel-cluster-server-envoy-rls/src/main/java/com/alibaba/csp/sentinel/cluster/server/envoy/rls/rule/EnvoySentinelRuleConverter.java index a7e65b17..8ae33c2c 100644 --- a/sentinel-cluster/sentinel-cluster-server-envoy-rls/src/main/java/com/alibaba/csp/sentinel/cluster/server/envoy/rls/rule/EnvoySentinelRuleConverter.java +++ b/sentinel-cluster/sentinel-cluster-server-envoy-rls/src/main/java/com/alibaba/csp/sentinel/cluster/server/envoy/rls/rule/EnvoySentinelRuleConverter.java @@ -69,7 +69,7 @@ public final class EnvoySentinelRuleConverter { return -1L; } // Add offset to avoid negative ID. - return Integer.MAX_VALUE + key.hashCode(); + return (long) Integer.MAX_VALUE + key.hashCode(); } public static String generateKey(String domain, EnvoyRlsRule.ResourceDescriptor descriptor) {