xds: enable ring hash by default (#8442)

This commit is contained in:
ZHANG Dapeng 2021-08-24 13:09:33 -07:00 committed by GitHub
parent cae2339366
commit 6776fa7c8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,7 @@
package io.grpc.xds;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Strings;
import io.grpc.Internal;
import io.grpc.LoadBalancer;
import io.grpc.LoadBalancer.Helper;
@ -45,7 +46,8 @@ public final class RingHashLoadBalancerProvider extends LoadBalancerProvider {
static final long MAX_RING_SIZE = 8 * 1024 * 1024L;
private static final boolean enableRingHash =
Boolean.parseBoolean(System.getenv("GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH"));
Strings.isNullOrEmpty(System.getenv("GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH"))
|| Boolean.parseBoolean(System.getenv("GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH"));
@Override
public LoadBalancer newLoadBalancer(Helper helper) {