Skip to content

Commit

Permalink
Disable new PickFirstLB
Browse files Browse the repository at this point in the history
  • Loading branch information
larry-safran committed May 7, 2024
1 parent dd6d125 commit 622e2cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public final class PickFirstLoadBalancerProvider extends LoadBalancerProvider {
private static final String SHUFFLE_ADDRESS_LIST_KEY = "shuffleAddressList";

static boolean enableNewPickFirst =
GrpcUtil.getFlag("GRPC_EXPERIMENTAL_ENABLE_NEW_PICK_FIRST", true);
GrpcUtil.getFlag("GRPC_EXPERIMENTAL_ENABLE_NEW_PICK_FIRST", false);

public static boolean isEnabledHappyEyeballs() {
return GrpcUtil.getFlag(GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS, false);
Expand Down
3 changes: 2 additions & 1 deletion xds/src/test/java/io/grpc/xds/RingHashLoadBalancerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,8 @@ public void skipFailingHosts_pickNextNonFailingHost() {
assertThat(result.getStatus().isOk()).isTrue();
assertThat(result.getSubchannel()).isNull(); // buffer request
int expectedTimes = PickFirstLoadBalancerProvider.isEnabledHappyEyeballs() ? 1 : 2;
verify(getSubChannel(servers.get(1)), times(expectedTimes)).requestConnection(); // kicked off connection to server2
// verify kicked off connection to server2
verify(getSubChannel(servers.get(1)), times(expectedTimes)).requestConnection();
assertThat(subchannels.size()).isEqualTo(2); // no excessive connection

deliverSubchannelState(getSubChannel(servers.get(1)), CSI_CONNECTING);
Expand Down

0 comments on commit 622e2cd

Please sign in to comment.