[ring_hash] delegate to pick_first as per dualstack design (#34244)

Rolls forward the changes from #33093 and some from #33568, which were
rolled back in #33718.
pull/34279/head
Mark D. Roth 2 years ago committed by GitHub
parent 3824288bad
commit a315171880
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/core/BUILD
  2. 893
      src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc
  3. 1
      src/core/lib/resolver/server_address.h
  4. 6
      test/cpp/end2end/xds/xds_ring_hash_end2end_test.cc

@ -4833,16 +4833,18 @@ grpc_cc_library(
deps = [
"channel_args",
"closure",
"delegating_helper",
"error",
"grpc_lb_subchannel_list",
"grpc_lb_policy_pick_first",
"grpc_service_config",
"json",
"json_args",
"json_object_loader",
"lb_policy",
"lb_policy_factory",
"lb_policy_registry",
"pollset_set",
"ref_counted",
"subchannel_interface",
"unique_type_name",
"validation_errors",
"//:channel_arg_names",

@ -58,6 +58,7 @@ class ServerAddress {
ServerAddress& operator=(ServerAddress&& other) noexcept;
bool operator==(const ServerAddress& other) const { return Cmp(other) == 0; }
bool operator<(const ServerAddress& other) const { return Cmp(other) < 0; }
int Cmp(const ServerAddress& other) const;

@ -995,7 +995,7 @@ TEST_P(RingHashTest, ReattemptWhenAllEndpointsUnreachable) {
CheckRpcSendFailure(
DEBUG_LOCATION, StatusCode::UNAVAILABLE,
MakeConnectionFailureRegex(
"ring hash cannot find a connected subchannel; first failure: "),
"ring hash cannot find a connected endpoint; first failure: "),
RpcOptions().set_metadata(std::move(metadata)));
StartBackend(0);
// Ensure we are actively connecting without any traffic.
@ -1034,7 +1034,7 @@ TEST_P(RingHashTest, TransientFailureSkipToAvailableReady) {
CheckRpcSendFailure(
DEBUG_LOCATION, StatusCode::UNAVAILABLE,
MakeConnectionFailureRegex(
"ring hash cannot find a connected subchannel; first failure: "),
"ring hash cannot find a connected endpoint; first failure: "),
rpc_options);
gpr_log(GPR_INFO, "=== DONE WITH FIRST RPC ===");
EXPECT_EQ(GRPC_CHANNEL_TRANSIENT_FAILURE, channel_->GetState(false));
@ -1070,7 +1070,7 @@ TEST_P(RingHashTest, TransientFailureSkipToAvailableReady) {
CheckRpcSendFailure(
DEBUG_LOCATION, StatusCode::UNAVAILABLE,
MakeConnectionFailureRegex(
"ring hash cannot find a connected subchannel; first failure: "),
"ring hash cannot find a connected endpoint; first failure: "),
rpc_options);
gpr_log(GPR_INFO, "=== STARTING BACKEND 1 ===");
StartBackend(1);

Loading…
Cancel
Save