Fix flowId offset bug in EnvoySentinelRuleConverter

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
This commit is contained in:
Eric Zhao 2019-11-07 12:46:33 +08:00
parent b66680be87
commit ff5c010a51
1 changed files with 1 additions and 1 deletions

View File

@ -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) {