diff --git a/CMakeLists.txt b/CMakeLists.txt index f9c103aa096bc4b9b223339214a52543ac27f345..8294a2c2e1f289b4087f94daa1386e5f3f8e1b26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16791,6 +16791,10 @@ endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) add_executable(xds_end2end_test + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/ads_for_test.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/ads_for_test.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/ads_for_test.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/ads_for_test.grpc.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/eds_for_test.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/eds_for_test.pb.h @@ -16804,6 +16808,9 @@ add_executable(xds_end2end_test third_party/googletest/googlemock/src/gmock-all.cc ) +protobuf_generate_grpc_cpp( + src/proto/grpc/testing/xds/ads_for_test.proto +) protobuf_generate_grpc_cpp( src/proto/grpc/testing/xds/eds_for_test.proto ) diff --git a/Makefile b/Makefile index 58f22d23969217fd6b0e76eb9c03ef103f302bbb..6055df352df165f66459094dc6cc1c4d07a6dca9 100644 --- a/Makefile +++ b/Makefile @@ -2984,6 +2984,22 @@ $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc: src/proto/grpc/testi $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< endif +ifeq ($(NO_PROTOC),true) +$(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.grpc.pb.cc: protoc_dep_error +else + +$(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.pb.cc: src/proto/grpc/testing/xds/ads_for_test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.pb.cc + $(E) "[PROTOC] Generating protobuf CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< + +$(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.grpc.pb.cc: src/proto/grpc/testing/xds/ads_for_test.proto $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc + $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< +endif + ifeq ($(NO_PROTOC),true) $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.pb.cc: protoc_dep_error $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc: protoc_dep_error @@ -20004,6 +20020,7 @@ endif XDS_END2END_TEST_SRC = \ + $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.cc \ test/cpp/end2end/xds_end2end_test.cc \ @@ -20037,6 +20054,8 @@ endif endif +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/xds/ads_for_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/xds/eds_for_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/xds/lrs_for_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -20050,7 +20069,7 @@ ifneq ($(NO_DEPS),true) -include $(XDS_END2END_TEST_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/end2end/xds_end2end_test.o: $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/end2end/xds_end2end_test.o: $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.cc PUBLIC_HEADERS_MUST_BE_C89_SRC = \ diff --git a/build.yaml b/build.yaml index b976307028fd9cb3f298308fb4d6272ab0b0cc5d..2f7f02514d3cd24210a224cb00adf9d143428201 100644 --- a/build.yaml +++ b/build.yaml @@ -6009,6 +6009,7 @@ targets: build: test language: c++ src: + - src/proto/grpc/testing/xds/ads_for_test.proto - src/proto/grpc/testing/xds/eds_for_test.proto - src/proto/grpc/testing/xds/lrs_for_test.proto - test/cpp/end2end/xds_end2end_test.cc diff --git a/src/core/ext/filters/client_channel/xds/xds_client.cc b/src/core/ext/filters/client_channel/xds/xds_client.cc index de30664d225ff1ab4f5eb15eed189004f6452874..c1954c03ee1c7a90dd7cb211e3b5270579fa5ed7 100644 --- a/src/core/ext/filters/client_channel/xds/xds_client.cc +++ b/src/core/ext/filters/client_channel/xds/xds_client.cc @@ -114,16 +114,16 @@ class XdsClient::ChannelState : public InternallyRefCounted<ChannelState> { bool shutting_down_ = false; }; - // Contains an EDS call to the xds server. - class EdsCallState : public InternallyRefCounted<EdsCallState> { + // Contains an ADS call to the xds server. + class AdsCallState : public InternallyRefCounted<AdsCallState> { public: // The ctor and dtor should not be used directly. - explicit EdsCallState(RefCountedPtr<RetryableCall<EdsCallState>> parent); - ~EdsCallState() override; + explicit AdsCallState(RefCountedPtr<RetryableCall<AdsCallState>> parent); + ~AdsCallState() override; void Orphan() override; - RetryableCall<EdsCallState>* parent() const { return parent_.get(); } + RetryableCall<AdsCallState>* parent() const { return parent_.get(); } ChannelState* chand() const { return parent_->chand(); } XdsClient* xds_client() const { return chand()->xds_client(); } bool seen_response() const { return seen_response_; } @@ -135,7 +135,7 @@ class XdsClient::ChannelState : public InternallyRefCounted<ChannelState> { bool IsCurrentCallOnChannel() const; // The owning RetryableCall<>. - RefCountedPtr<RetryableCall<EdsCallState>> parent_; + RefCountedPtr<RetryableCall<AdsCallState>> parent_; bool seen_response_ = false; // Always non-NULL. @@ -256,16 +256,16 @@ class XdsClient::ChannelState : public InternallyRefCounted<ChannelState> { grpc_channel* channel() const { return channel_; } XdsClient* xds_client() const { return xds_client_.get(); } - EdsCallState* eds_calld() const { return eds_calld_->calld(); } + AdsCallState* ads_calld() const { return ads_calld_->calld(); } LrsCallState* lrs_calld() const { return lrs_calld_->calld(); } - void MaybeStartEdsCall(); - void StopEdsCall(); + void MaybeStartAdsCall(); + void StopAdsCall(); void MaybeStartLrsCall(); void StopLrsCall(); - bool HasActiveEdsCall() const { return eds_calld_->calld() != nullptr; } + bool HasActiveAdsCall() const { return ads_calld_->calld() != nullptr; } void StartConnectivityWatchLocked(); void CancelConnectivityWatchLocked(); @@ -282,7 +282,7 @@ class XdsClient::ChannelState : public InternallyRefCounted<ChannelState> { StateWatcher* watcher_ = nullptr; // The retryable XDS calls. - OrphanablePtr<RetryableCall<EdsCallState>> eds_calld_; + OrphanablePtr<RetryableCall<AdsCallState>> ads_calld_; OrphanablePtr<RetryableCall<LrsCallState>> lrs_calld_; }; @@ -396,18 +396,18 @@ XdsClient::ChannelState::~ChannelState() { void XdsClient::ChannelState::Orphan() { shutting_down_ = true; CancelConnectivityWatchLocked(); - eds_calld_.reset(); + ads_calld_.reset(); lrs_calld_.reset(); Unref(DEBUG_LOCATION, "ChannelState+orphaned"); } -void XdsClient::ChannelState::MaybeStartEdsCall() { - if (eds_calld_ != nullptr) return; - eds_calld_.reset(New<RetryableCall<EdsCallState>>( - Ref(DEBUG_LOCATION, "ChannelState+eds"))); +void XdsClient::ChannelState::MaybeStartAdsCall() { + if (ads_calld_ != nullptr) return; + ads_calld_.reset(New<RetryableCall<AdsCallState>>( + Ref(DEBUG_LOCATION, "ChannelState+ads"))); } -void XdsClient::ChannelState::StopEdsCall() { eds_calld_.reset(); } +void XdsClient::ChannelState::StopAdsCall() { ads_calld_.reset(); } void XdsClient::ChannelState::MaybeStartLrsCall() { if (lrs_calld_ != nullptr) return; @@ -526,14 +526,14 @@ void XdsClient::ChannelState::RetryableCall<T>::OnRetryTimerLocked( } // -// XdsClient::ChannelState::EdsCallState +// XdsClient::ChannelState::AdsCallState // -XdsClient::ChannelState::EdsCallState::EdsCallState( - RefCountedPtr<RetryableCall<EdsCallState>> parent) - : InternallyRefCounted<EdsCallState>(&grpc_xds_client_trace), +XdsClient::ChannelState::AdsCallState::AdsCallState( + RefCountedPtr<RetryableCall<AdsCallState>> parent) + : InternallyRefCounted<AdsCallState>(&grpc_xds_client_trace), parent_(std::move(parent)) { - // Init the EDS call. Note that the call will progress every time there's + // Init the ADS call. Note that the call will progress every time there's // activity in xds_client()->interested_parties_, which is comprised of // the polling entities from client_channel. GPR_ASSERT(xds_client() != nullptr); @@ -543,7 +543,7 @@ XdsClient::ChannelState::EdsCallState::EdsCallState( call_ = grpc_channel_create_pollset_set_call( chand()->channel_, nullptr, GRPC_PROPAGATE_DEFAULTS, xds_client()->interested_parties_, - GRPC_MDSTR_SLASH_ENVOY_DOT_API_DOT_V2_DOT_ENDPOINTDISCOVERYSERVICE_SLASH_STREAMENDPOINTS, + GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_DISCOVERY_DOT_V2_DOT_AGGREGATEDDISCOVERYSERVICE_SLASH_STREAMAGGREGATEDRESOURCES, nullptr, GRPC_MILLIS_INF_FUTURE, nullptr); GPR_ASSERT(call_ != nullptr); // Init the request payload. @@ -562,7 +562,7 @@ XdsClient::ChannelState::EdsCallState::EdsCallState( // Start the call. if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { gpr_log(GPR_INFO, - "[xds_client %p] Starting EDS call (chand: %p, calld: %p, " + "[xds_client %p] Starting ADS call (chand: %p, calld: %p, " "call: %p)", xds_client(), chand(), this, call_); } @@ -601,7 +601,7 @@ XdsClient::ChannelState::EdsCallState::EdsCallState( op->flags = 0; op->reserved = nullptr; op++; - Ref(DEBUG_LOCATION, "EDS+OnResponseReceivedLocked").release(); + Ref(DEBUG_LOCATION, "ADS+OnResponseReceivedLocked").release(); call_error = grpc_call_start_batch_and_execute(call_, ops, (size_t)(op - ops), &on_response_received_); GPR_ASSERT(GRPC_CALL_OK == call_error); @@ -622,7 +622,7 @@ XdsClient::ChannelState::EdsCallState::EdsCallState( GPR_ASSERT(GRPC_CALL_OK == call_error); } -XdsClient::ChannelState::EdsCallState::~EdsCallState() { +XdsClient::ChannelState::AdsCallState::~AdsCallState() { grpc_metadata_array_destroy(&initial_metadata_recv_); grpc_metadata_array_destroy(&trailing_metadata_recv_); grpc_byte_buffer_destroy(send_message_payload_); @@ -632,7 +632,7 @@ XdsClient::ChannelState::EdsCallState::~EdsCallState() { grpc_call_unref(call_); } -void XdsClient::ChannelState::EdsCallState::Orphan() { +void XdsClient::ChannelState::AdsCallState::Orphan() { GPR_ASSERT(call_ != nullptr); // If we are here because xds_client wants to cancel the call, // on_status_received_ will complete the cancellation and clean up. Otherwise, @@ -643,23 +643,23 @@ void XdsClient::ChannelState::EdsCallState::Orphan() { // corresponding unref happens in on_status_received_ instead of here. } -void XdsClient::ChannelState::EdsCallState::OnResponseReceivedLocked( +void XdsClient::ChannelState::AdsCallState::OnResponseReceivedLocked( void* arg, grpc_error* error) { - EdsCallState* eds_calld = static_cast<EdsCallState*>(arg); - XdsClient* xds_client = eds_calld->xds_client(); + AdsCallState* ads_calld = static_cast<AdsCallState*>(arg); + XdsClient* xds_client = ads_calld->xds_client(); // Empty payload means the call was cancelled. - if (!eds_calld->IsCurrentCallOnChannel() || - eds_calld->recv_message_payload_ == nullptr) { - eds_calld->Unref(DEBUG_LOCATION, "EDS+OnResponseReceivedLocked"); + if (!ads_calld->IsCurrentCallOnChannel() || + ads_calld->recv_message_payload_ == nullptr) { + ads_calld->Unref(DEBUG_LOCATION, "ADS+OnResponseReceivedLocked"); return; } // Read the response. grpc_byte_buffer_reader bbr; - grpc_byte_buffer_reader_init(&bbr, eds_calld->recv_message_payload_); + grpc_byte_buffer_reader_init(&bbr, ads_calld->recv_message_payload_); grpc_slice response_slice = grpc_byte_buffer_reader_readall(&bbr); grpc_byte_buffer_reader_destroy(&bbr); - grpc_byte_buffer_destroy(eds_calld->recv_message_payload_); - eds_calld->recv_message_payload_ = nullptr; + grpc_byte_buffer_destroy(ads_calld->recv_message_payload_); + ads_calld->recv_message_payload_ = nullptr; // TODO(juanlishen): When we convert this to use the xds protocol, the // balancer will send us a fallback timeout such that we should go into // fallback mode if we have lost contact with the balancer after a certain @@ -676,7 +676,7 @@ void XdsClient::ChannelState::EdsCallState::OnResponseReceivedLocked( XdsEdsResponseDecodeAndParse(response_slice, &update); if (parse_error != GRPC_ERROR_NONE) { gpr_log(GPR_ERROR, - "[xds_client %p] EDS response parsing failed. error=%s", + "[xds_client %p] ADS response parsing failed. error=%s", xds_client, grpc_error_string(parse_error)); GRPC_ERROR_UNREF(parse_error); return; @@ -685,16 +685,16 @@ void XdsClient::ChannelState::EdsCallState::OnResponseReceivedLocked( char* response_slice_str = grpc_dump_slice(response_slice, GPR_DUMP_ASCII | GPR_DUMP_HEX); gpr_log(GPR_ERROR, - "[xds_client %p] EDS response '%s' doesn't contain any valid " + "[xds_client %p] ADS response '%s' doesn't contain any valid " "locality but doesn't require to drop all calls. Ignoring.", xds_client, response_slice_str); gpr_free(response_slice_str); return; } - eds_calld->seen_response_ = true; + ads_calld->seen_response_ = true; if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { gpr_log(GPR_INFO, - "[xds_client %p] EDS response with %" PRIuPTR + "[xds_client %p] ADS response with %" PRIuPTR " priorities and %" PRIuPTR " drop categories received (drop_all=%d)", xds_client, update.priority_list_update.size(), @@ -741,7 +741,7 @@ void XdsClient::ChannelState::EdsCallState::OnResponseReceivedLocked( } } // Start load reporting if needed. - LrsCallState* lrs_calld = eds_calld->chand()->lrs_calld_->calld(); + LrsCallState* lrs_calld = ads_calld->chand()->lrs_calld_->calld(); if (lrs_calld != nullptr) lrs_calld->MaybeStartReportingLocked(); // Ignore identical update. const EdsUpdate& prev_update = xds_client->cluster_state_.eds_update; @@ -768,54 +768,54 @@ void XdsClient::ChannelState::EdsCallState::OnResponseReceivedLocked( }(); grpc_slice_unref_internal(response_slice); if (xds_client->shutting_down_) { - eds_calld->Unref(DEBUG_LOCATION, - "EDS+OnResponseReceivedLocked+xds_shutdown"); + ads_calld->Unref(DEBUG_LOCATION, + "ADS+OnResponseReceivedLocked+xds_shutdown"); return; } // Keep listening for serverlist updates. grpc_op op; memset(&op, 0, sizeof(op)); op.op = GRPC_OP_RECV_MESSAGE; - op.data.recv_message.recv_message = &eds_calld->recv_message_payload_; + op.data.recv_message.recv_message = &ads_calld->recv_message_payload_; op.flags = 0; op.reserved = nullptr; - GPR_ASSERT(eds_calld->call_ != nullptr); - // Reuse the "EDS+OnResponseReceivedLocked" ref taken in ctor. + GPR_ASSERT(ads_calld->call_ != nullptr); + // Reuse the "ADS+OnResponseReceivedLocked" ref taken in ctor. const grpc_call_error call_error = grpc_call_start_batch_and_execute( - eds_calld->call_, &op, 1, &eds_calld->on_response_received_); + ads_calld->call_, &op, 1, &ads_calld->on_response_received_); GPR_ASSERT(GRPC_CALL_OK == call_error); } -void XdsClient::ChannelState::EdsCallState::OnStatusReceivedLocked( +void XdsClient::ChannelState::AdsCallState::OnStatusReceivedLocked( void* arg, grpc_error* error) { - EdsCallState* eds_calld = static_cast<EdsCallState*>(arg); - ChannelState* chand = eds_calld->chand(); - XdsClient* xds_client = eds_calld->xds_client(); + AdsCallState* ads_calld = static_cast<AdsCallState*>(arg); + ChannelState* chand = ads_calld->chand(); + XdsClient* xds_client = ads_calld->xds_client(); if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { - char* status_details = grpc_slice_to_c_string(eds_calld->status_details_); + char* status_details = grpc_slice_to_c_string(ads_calld->status_details_); gpr_log(GPR_INFO, - "[xds_client %p] EDS call status received. Status = %d, details " - "= '%s', (chand: %p, eds_calld: %p, call: %p), error '%s'", - xds_client, eds_calld->status_code_, status_details, chand, - eds_calld, eds_calld->call_, grpc_error_string(error)); + "[xds_client %p] ADS call status received. Status = %d, details " + "= '%s', (chand: %p, ads_calld: %p, call: %p), error '%s'", + xds_client, ads_calld->status_code_, status_details, chand, + ads_calld, ads_calld->call_, grpc_error_string(error)); gpr_free(status_details); } // Ignore status from a stale call. - if (eds_calld->IsCurrentCallOnChannel()) { + if (ads_calld->IsCurrentCallOnChannel()) { // Try to restart the call. - eds_calld->parent_->OnCallFinishedLocked(); + ads_calld->parent_->OnCallFinishedLocked(); // Send error to all watchers. xds_client->NotifyOnError( GRPC_ERROR_CREATE_FROM_STATIC_STRING("xds call failed")); } - eds_calld->Unref(DEBUG_LOCATION, "EDS+OnStatusReceivedLocked"); + ads_calld->Unref(DEBUG_LOCATION, "ADS+OnStatusReceivedLocked"); } -bool XdsClient::ChannelState::EdsCallState::IsCurrentCallOnChannel() const { - // If the retryable EDS call is null (which only happens when the xds channel - // is shutting down), all the EDS calls are stale. - if (chand()->eds_calld_ == nullptr) return false; - return this == chand()->eds_calld_->calld(); +bool XdsClient::ChannelState::AdsCallState::IsCurrentCallOnChannel() const { + // If the retryable ADS call is null (which only happens when the xds channel + // is shutting down), all the ADS calls are stale. + if (chand()->ads_calld_ == nullptr) return false; + return this == chand()->ads_calld_->calld(); } // @@ -1031,11 +1031,11 @@ void XdsClient::ChannelState::LrsCallState::MaybeStartReportingLocked() { if (send_message_payload_ != nullptr) return; // Don't start if no LRS response has arrived. if (!seen_response()) return; - // Don't start if the EDS call hasn't received any valid response. Note that + // Don't start if the ADS call hasn't received any valid response. Note that // this must be the first channel because it is the current channel but its - // EDS call hasn't seen any response. - EdsCallState* eds_calld = chand()->eds_calld_->calld(); - if (eds_calld == nullptr || !eds_calld->seen_response()) return; + // ADS call hasn't seen any response. + AdsCallState* ads_calld = chand()->ads_calld_->calld(); + if (ads_calld == nullptr || !ads_calld->seen_response()) return; // Start reporting. for (auto* client_stats : chand()->xds_client_->cluster_state_.client_stats) { client_stats->MaybeInitLastReportTime(); @@ -1219,7 +1219,7 @@ void XdsClient::WatchEndpointData(StringView cluster, if (!cluster_state_.eds_update.priority_list_update.empty()) { w->OnEndpointChanged(cluster_state_.eds_update); } - chand_->MaybeStartEdsCall(); + chand_->MaybeStartAdsCall(); } void XdsClient::CancelEndpointDataWatch(StringView cluster, @@ -1228,7 +1228,7 @@ void XdsClient::CancelEndpointDataWatch(StringView cluster, if (it != cluster_state_.endpoint_watchers.end()) { cluster_state_.endpoint_watchers.erase(it); } - if (cluster_state_.endpoint_watchers.empty()) chand_->StopEdsCall(); + if (cluster_state_.endpoint_watchers.empty()) chand_->StopAdsCall(); } void XdsClient::AddClientStats(StringView cluster, diff --git a/src/core/lib/transport/static_metadata.cc b/src/core/lib/transport/static_metadata.cc index f412edb1efe5c73a2c56528a7b6bc432b4071ac3..a86ab0023096bacec089e2c7ddaab629b9211c3e 100644 --- a/src/core/lib/transport/static_metadata.cc +++ b/src/core/lib/transport/static_metadata.cc @@ -68,62 +68,59 @@ static constexpr uint8_t g_bytes[] = { 114, 118, 105, 99, 101, 46, 108, 111, 97, 100, 95, 115, 116, 97, 116, 115, 46, 118, 50, 46, 76, 111, 97, 100, 82, 101, 112, 111, 114, 116, 105, 110, 103, 83, 101, 114, 118, 105, 99, 101, 47, 83, 116, 114, 101, - 97, 109, 76, 111, 97, 100, 83, 116, 97, 116, 115, 47, 101, 110, 118, - 111, 121, 46, 97, 112, 105, 46, 118, 50, 46, 69, 110, 100, 112, 111, - 105, 110, 116, 68, 105, 115, 99, 111, 118, 101, 114, 121, 83, 101, 114, - 118, 105, 99, 101, 47, 83, 116, 114, 101, 97, 109, 69, 110, 100, 112, - 111, 105, 110, 116, 115, 47, 103, 114, 112, 99, 46, 104, 101, 97, 108, - 116, 104, 46, 118, 49, 46, 72, 101, 97, 108, 116, 104, 47, 87, 97, - 116, 99, 104, 47, 101, 110, 118, 111, 121, 46, 115, 101, 114, 118, 105, - 99, 101, 46, 100, 105, 115, 99, 111, 118, 101, 114, 121, 46, 118, 50, - 46, 65, 103, 103, 114, 101, 103, 97, 116, 101, 100, 68, 105, 115, 99, - 111, 118, 101, 114, 121, 83, 101, 114, 118, 105, 99, 101, 47, 83, 116, - 114, 101, 97, 109, 65, 103, 103, 114, 101, 103, 97, 116, 101, 100, 82, - 101, 115, 111, 117, 114, 99, 101, 115, 100, 101, 102, 108, 97, 116, 101, - 103, 122, 105, 112, 115, 116, 114, 101, 97, 109, 47, 103, 122, 105, 112, - 71, 69, 84, 80, 79, 83, 84, 47, 47, 105, 110, 100, 101, 120, 46, - 104, 116, 109, 108, 104, 116, 116, 112, 104, 116, 116, 112, 115, 50, 48, - 48, 50, 48, 52, 50, 48, 54, 51, 48, 52, 52, 48, 48, 52, 48, - 52, 53, 48, 48, 97, 99, 99, 101, 112, 116, 45, 99, 104, 97, 114, - 115, 101, 116, 103, 122, 105, 112, 44, 32, 100, 101, 102, 108, 97, 116, - 101, 97, 99, 99, 101, 112, 116, 45, 108, 97, 110, 103, 117, 97, 103, - 101, 97, 99, 99, 101, 112, 116, 45, 114, 97, 110, 103, 101, 115, 97, - 99, 99, 101, 112, 116, 97, 99, 99, 101, 115, 115, 45, 99, 111, 110, - 116, 114, 111, 108, 45, 97, 108, 108, 111, 119, 45, 111, 114, 105, 103, - 105, 110, 97, 103, 101, 97, 108, 108, 111, 119, 97, 117, 116, 104, 111, - 114, 105, 122, 97, 116, 105, 111, 110, 99, 97, 99, 104, 101, 45, 99, - 111, 110, 116, 114, 111, 108, 99, 111, 110, 116, 101, 110, 116, 45, 100, - 105, 115, 112, 111, 115, 105, 116, 105, 111, 110, 99, 111, 110, 116, 101, - 110, 116, 45, 108, 97, 110, 103, 117, 97, 103, 101, 99, 111, 110, 116, - 101, 110, 116, 45, 108, 101, 110, 103, 116, 104, 99, 111, 110, 116, 101, - 110, 116, 45, 108, 111, 99, 97, 116, 105, 111, 110, 99, 111, 110, 116, - 101, 110, 116, 45, 114, 97, 110, 103, 101, 99, 111, 111, 107, 105, 101, - 100, 97, 116, 101, 101, 116, 97, 103, 101, 120, 112, 101, 99, 116, 101, - 120, 112, 105, 114, 101, 115, 102, 114, 111, 109, 105, 102, 45, 109, 97, - 116, 99, 104, 105, 102, 45, 109, 111, 100, 105, 102, 105, 101, 100, 45, - 115, 105, 110, 99, 101, 105, 102, 45, 110, 111, 110, 101, 45, 109, 97, - 116, 99, 104, 105, 102, 45, 114, 97, 110, 103, 101, 105, 102, 45, 117, - 110, 109, 111, 100, 105, 102, 105, 101, 100, 45, 115, 105, 110, 99, 101, - 108, 97, 115, 116, 45, 109, 111, 100, 105, 102, 105, 101, 100, 108, 105, - 110, 107, 108, 111, 99, 97, 116, 105, 111, 110, 109, 97, 120, 45, 102, - 111, 114, 119, 97, 114, 100, 115, 112, 114, 111, 120, 121, 45, 97, 117, - 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 112, 114, 111, 120, 121, - 45, 97, 117, 116, 104, 111, 114, 105, 122, 97, 116, 105, 111, 110, 114, - 97, 110, 103, 101, 114, 101, 102, 101, 114, 101, 114, 114, 101, 102, 114, - 101, 115, 104, 114, 101, 116, 114, 121, 45, 97, 102, 116, 101, 114, 115, - 101, 114, 118, 101, 114, 115, 101, 116, 45, 99, 111, 111, 107, 105, 101, - 115, 116, 114, 105, 99, 116, 45, 116, 114, 97, 110, 115, 112, 111, 114, - 116, 45, 115, 101, 99, 117, 114, 105, 116, 121, 116, 114, 97, 110, 115, - 102, 101, 114, 45, 101, 110, 99, 111, 100, 105, 110, 103, 118, 97, 114, - 121, 118, 105, 97, 119, 119, 119, 45, 97, 117, 116, 104, 101, 110, 116, - 105, 99, 97, 116, 101, 48, 105, 100, 101, 110, 116, 105, 116, 121, 116, - 114, 97, 105, 108, 101, 114, 115, 97, 112, 112, 108, 105, 99, 97, 116, - 105, 111, 110, 47, 103, 114, 112, 99, 103, 114, 112, 99, 80, 85, 84, - 108, 98, 45, 99, 111, 115, 116, 45, 98, 105, 110, 105, 100, 101, 110, - 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, 105, 100, 101, - 110, 116, 105, 116, 121, 44, 103, 122, 105, 112, 100, 101, 102, 108, 97, - 116, 101, 44, 103, 122, 105, 112, 105, 100, 101, 110, 116, 105, 116, 121, - 44, 100, 101, 102, 108, 97, 116, 101, 44, 103, 122, 105, 112}; + 97, 109, 76, 111, 97, 100, 83, 116, 97, 116, 115, 47, 103, 114, 112, + 99, 46, 104, 101, 97, 108, 116, 104, 46, 118, 49, 46, 72, 101, 97, + 108, 116, 104, 47, 87, 97, 116, 99, 104, 47, 101, 110, 118, 111, 121, + 46, 115, 101, 114, 118, 105, 99, 101, 46, 100, 105, 115, 99, 111, 118, + 101, 114, 121, 46, 118, 50, 46, 65, 103, 103, 114, 101, 103, 97, 116, + 101, 100, 68, 105, 115, 99, 111, 118, 101, 114, 121, 83, 101, 114, 118, + 105, 99, 101, 47, 83, 116, 114, 101, 97, 109, 65, 103, 103, 114, 101, + 103, 97, 116, 101, 100, 82, 101, 115, 111, 117, 114, 99, 101, 115, 100, + 101, 102, 108, 97, 116, 101, 103, 122, 105, 112, 115, 116, 114, 101, 97, + 109, 47, 103, 122, 105, 112, 71, 69, 84, 80, 79, 83, 84, 47, 47, + 105, 110, 100, 101, 120, 46, 104, 116, 109, 108, 104, 116, 116, 112, 104, + 116, 116, 112, 115, 50, 48, 48, 50, 48, 52, 50, 48, 54, 51, 48, + 52, 52, 48, 48, 52, 48, 52, 53, 48, 48, 97, 99, 99, 101, 112, + 116, 45, 99, 104, 97, 114, 115, 101, 116, 103, 122, 105, 112, 44, 32, + 100, 101, 102, 108, 97, 116, 101, 97, 99, 99, 101, 112, 116, 45, 108, + 97, 110, 103, 117, 97, 103, 101, 97, 99, 99, 101, 112, 116, 45, 114, + 97, 110, 103, 101, 115, 97, 99, 99, 101, 112, 116, 97, 99, 99, 101, + 115, 115, 45, 99, 111, 110, 116, 114, 111, 108, 45, 97, 108, 108, 111, + 119, 45, 111, 114, 105, 103, 105, 110, 97, 103, 101, 97, 108, 108, 111, + 119, 97, 117, 116, 104, 111, 114, 105, 122, 97, 116, 105, 111, 110, 99, + 97, 99, 104, 101, 45, 99, 111, 110, 116, 114, 111, 108, 99, 111, 110, + 116, 101, 110, 116, 45, 100, 105, 115, 112, 111, 115, 105, 116, 105, 111, + 110, 99, 111, 110, 116, 101, 110, 116, 45, 108, 97, 110, 103, 117, 97, + 103, 101, 99, 111, 110, 116, 101, 110, 116, 45, 108, 101, 110, 103, 116, + 104, 99, 111, 110, 116, 101, 110, 116, 45, 108, 111, 99, 97, 116, 105, + 111, 110, 99, 111, 110, 116, 101, 110, 116, 45, 114, 97, 110, 103, 101, + 99, 111, 111, 107, 105, 101, 100, 97, 116, 101, 101, 116, 97, 103, 101, + 120, 112, 101, 99, 116, 101, 120, 112, 105, 114, 101, 115, 102, 114, 111, + 109, 105, 102, 45, 109, 97, 116, 99, 104, 105, 102, 45, 109, 111, 100, + 105, 102, 105, 101, 100, 45, 115, 105, 110, 99, 101, 105, 102, 45, 110, + 111, 110, 101, 45, 109, 97, 116, 99, 104, 105, 102, 45, 114, 97, 110, + 103, 101, 105, 102, 45, 117, 110, 109, 111, 100, 105, 102, 105, 101, 100, + 45, 115, 105, 110, 99, 101, 108, 97, 115, 116, 45, 109, 111, 100, 105, + 102, 105, 101, 100, 108, 105, 110, 107, 108, 111, 99, 97, 116, 105, 111, + 110, 109, 97, 120, 45, 102, 111, 114, 119, 97, 114, 100, 115, 112, 114, + 111, 120, 121, 45, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, + 101, 112, 114, 111, 120, 121, 45, 97, 117, 116, 104, 111, 114, 105, 122, + 97, 116, 105, 111, 110, 114, 97, 110, 103, 101, 114, 101, 102, 101, 114, + 101, 114, 114, 101, 102, 114, 101, 115, 104, 114, 101, 116, 114, 121, 45, + 97, 102, 116, 101, 114, 115, 101, 114, 118, 101, 114, 115, 101, 116, 45, + 99, 111, 111, 107, 105, 101, 115, 116, 114, 105, 99, 116, 45, 116, 114, + 97, 110, 115, 112, 111, 114, 116, 45, 115, 101, 99, 117, 114, 105, 116, + 121, 116, 114, 97, 110, 115, 102, 101, 114, 45, 101, 110, 99, 111, 100, + 105, 110, 103, 118, 97, 114, 121, 118, 105, 97, 119, 119, 119, 45, 97, + 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 48, 105, 100, 101, + 110, 116, 105, 116, 121, 116, 114, 97, 105, 108, 101, 114, 115, 97, 112, + 112, 108, 105, 99, 97, 116, 105, 111, 110, 47, 103, 114, 112, 99, 103, + 114, 112, 99, 80, 85, 84, 108, 98, 45, 99, 111, 115, 116, 45, 98, + 105, 110, 105, 100, 101, 110, 116, 105, 116, 121, 44, 100, 101, 102, 108, + 97, 116, 101, 105, 100, 101, 110, 116, 105, 116, 121, 44, 103, 122, 105, + 112, 100, 101, 102, 108, 97, 116, 101, 44, 103, 122, 105, 112, 105, 100, + 101, 110, 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, 44, + 103, 122, 105, 112}; grpc_slice_refcount grpc_core::StaticSliceRefcount::kStaticSubRefcount; @@ -188,7 +185,6 @@ struct StaticMetadataCtx { StaticSliceRefcount(102), StaticSliceRefcount(103), StaticSliceRefcount(104), StaticSliceRefcount(105), StaticSliceRefcount(106), StaticSliceRefcount(107), - StaticSliceRefcount(108), }; const StaticMetadataSlice slices[GRPC_STATIC_MDSTR_COUNT] = { @@ -229,79 +225,78 @@ struct StaticMetadataCtx { grpc_core::StaticMetadataSlice(&refcounts[33].base, 31, g_bytes + 434), grpc_core::StaticMetadataSlice(&refcounts[34].base, 36, g_bytes + 465), grpc_core::StaticMetadataSlice(&refcounts[35].base, 65, g_bytes + 501), - grpc_core::StaticMetadataSlice(&refcounts[36].base, 54, g_bytes + 566), - grpc_core::StaticMetadataSlice(&refcounts[37].base, 28, g_bytes + 620), - grpc_core::StaticMetadataSlice(&refcounts[38].base, 80, g_bytes + 648), - grpc_core::StaticMetadataSlice(&refcounts[39].base, 7, g_bytes + 728), - grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735), - grpc_core::StaticMetadataSlice(&refcounts[41].base, 11, g_bytes + 739), - grpc_core::StaticMetadataSlice(&refcounts[42].base, 3, g_bytes + 750), - grpc_core::StaticMetadataSlice(&refcounts[43].base, 4, g_bytes + 753), - grpc_core::StaticMetadataSlice(&refcounts[44].base, 1, g_bytes + 757), - grpc_core::StaticMetadataSlice(&refcounts[45].base, 11, g_bytes + 758), - grpc_core::StaticMetadataSlice(&refcounts[46].base, 4, g_bytes + 769), - grpc_core::StaticMetadataSlice(&refcounts[47].base, 5, g_bytes + 773), - grpc_core::StaticMetadataSlice(&refcounts[48].base, 3, g_bytes + 778), - grpc_core::StaticMetadataSlice(&refcounts[49].base, 3, g_bytes + 781), - grpc_core::StaticMetadataSlice(&refcounts[50].base, 3, g_bytes + 784), - grpc_core::StaticMetadataSlice(&refcounts[51].base, 3, g_bytes + 787), - grpc_core::StaticMetadataSlice(&refcounts[52].base, 3, g_bytes + 790), - grpc_core::StaticMetadataSlice(&refcounts[53].base, 3, g_bytes + 793), - grpc_core::StaticMetadataSlice(&refcounts[54].base, 3, g_bytes + 796), - grpc_core::StaticMetadataSlice(&refcounts[55].base, 14, g_bytes + 799), - grpc_core::StaticMetadataSlice(&refcounts[56].base, 13, g_bytes + 813), - grpc_core::StaticMetadataSlice(&refcounts[57].base, 15, g_bytes + 826), - grpc_core::StaticMetadataSlice(&refcounts[58].base, 13, g_bytes + 841), - grpc_core::StaticMetadataSlice(&refcounts[59].base, 6, g_bytes + 854), - grpc_core::StaticMetadataSlice(&refcounts[60].base, 27, g_bytes + 860), - grpc_core::StaticMetadataSlice(&refcounts[61].base, 3, g_bytes + 887), - grpc_core::StaticMetadataSlice(&refcounts[62].base, 5, g_bytes + 890), - grpc_core::StaticMetadataSlice(&refcounts[63].base, 13, g_bytes + 895), - grpc_core::StaticMetadataSlice(&refcounts[64].base, 13, g_bytes + 908), - grpc_core::StaticMetadataSlice(&refcounts[65].base, 19, g_bytes + 921), - grpc_core::StaticMetadataSlice(&refcounts[66].base, 16, g_bytes + 940), - grpc_core::StaticMetadataSlice(&refcounts[67].base, 14, g_bytes + 956), - grpc_core::StaticMetadataSlice(&refcounts[68].base, 16, g_bytes + 970), - grpc_core::StaticMetadataSlice(&refcounts[69].base, 13, g_bytes + 986), - grpc_core::StaticMetadataSlice(&refcounts[70].base, 6, g_bytes + 999), - grpc_core::StaticMetadataSlice(&refcounts[71].base, 4, g_bytes + 1005), - grpc_core::StaticMetadataSlice(&refcounts[72].base, 4, g_bytes + 1009), - grpc_core::StaticMetadataSlice(&refcounts[73].base, 6, g_bytes + 1013), - grpc_core::StaticMetadataSlice(&refcounts[74].base, 7, g_bytes + 1019), - grpc_core::StaticMetadataSlice(&refcounts[75].base, 4, g_bytes + 1026), - grpc_core::StaticMetadataSlice(&refcounts[76].base, 8, g_bytes + 1030), - grpc_core::StaticMetadataSlice(&refcounts[77].base, 17, g_bytes + 1038), - grpc_core::StaticMetadataSlice(&refcounts[78].base, 13, g_bytes + 1055), - grpc_core::StaticMetadataSlice(&refcounts[79].base, 8, g_bytes + 1068), - grpc_core::StaticMetadataSlice(&refcounts[80].base, 19, g_bytes + 1076), - grpc_core::StaticMetadataSlice(&refcounts[81].base, 13, g_bytes + 1095), - grpc_core::StaticMetadataSlice(&refcounts[82].base, 4, g_bytes + 1108), - grpc_core::StaticMetadataSlice(&refcounts[83].base, 8, g_bytes + 1112), - grpc_core::StaticMetadataSlice(&refcounts[84].base, 12, g_bytes + 1120), - grpc_core::StaticMetadataSlice(&refcounts[85].base, 18, g_bytes + 1132), - grpc_core::StaticMetadataSlice(&refcounts[86].base, 19, g_bytes + 1150), - grpc_core::StaticMetadataSlice(&refcounts[87].base, 5, g_bytes + 1169), - grpc_core::StaticMetadataSlice(&refcounts[88].base, 7, g_bytes + 1174), - grpc_core::StaticMetadataSlice(&refcounts[89].base, 7, g_bytes + 1181), - grpc_core::StaticMetadataSlice(&refcounts[90].base, 11, g_bytes + 1188), - grpc_core::StaticMetadataSlice(&refcounts[91].base, 6, g_bytes + 1199), - grpc_core::StaticMetadataSlice(&refcounts[92].base, 10, g_bytes + 1205), - grpc_core::StaticMetadataSlice(&refcounts[93].base, 25, g_bytes + 1215), - grpc_core::StaticMetadataSlice(&refcounts[94].base, 17, g_bytes + 1240), - grpc_core::StaticMetadataSlice(&refcounts[95].base, 4, g_bytes + 1257), - grpc_core::StaticMetadataSlice(&refcounts[96].base, 3, g_bytes + 1261), - grpc_core::StaticMetadataSlice(&refcounts[97].base, 16, g_bytes + 1264), - grpc_core::StaticMetadataSlice(&refcounts[98].base, 1, g_bytes + 1280), - grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, g_bytes + 1281), - grpc_core::StaticMetadataSlice(&refcounts[100].base, 8, g_bytes + 1289), - grpc_core::StaticMetadataSlice(&refcounts[101].base, 16, g_bytes + 1297), - grpc_core::StaticMetadataSlice(&refcounts[102].base, 4, g_bytes + 1313), - grpc_core::StaticMetadataSlice(&refcounts[103].base, 3, g_bytes + 1317), - grpc_core::StaticMetadataSlice(&refcounts[104].base, 11, g_bytes + 1320), - grpc_core::StaticMetadataSlice(&refcounts[105].base, 16, g_bytes + 1331), - grpc_core::StaticMetadataSlice(&refcounts[106].base, 13, g_bytes + 1347), - grpc_core::StaticMetadataSlice(&refcounts[107].base, 12, g_bytes + 1360), - grpc_core::StaticMetadataSlice(&refcounts[108].base, 21, g_bytes + 1372), + grpc_core::StaticMetadataSlice(&refcounts[36].base, 28, g_bytes + 566), + grpc_core::StaticMetadataSlice(&refcounts[37].base, 80, g_bytes + 594), + grpc_core::StaticMetadataSlice(&refcounts[38].base, 7, g_bytes + 674), + grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 681), + grpc_core::StaticMetadataSlice(&refcounts[40].base, 11, g_bytes + 685), + grpc_core::StaticMetadataSlice(&refcounts[41].base, 3, g_bytes + 696), + grpc_core::StaticMetadataSlice(&refcounts[42].base, 4, g_bytes + 699), + grpc_core::StaticMetadataSlice(&refcounts[43].base, 1, g_bytes + 703), + grpc_core::StaticMetadataSlice(&refcounts[44].base, 11, g_bytes + 704), + grpc_core::StaticMetadataSlice(&refcounts[45].base, 4, g_bytes + 715), + grpc_core::StaticMetadataSlice(&refcounts[46].base, 5, g_bytes + 719), + grpc_core::StaticMetadataSlice(&refcounts[47].base, 3, g_bytes + 724), + grpc_core::StaticMetadataSlice(&refcounts[48].base, 3, g_bytes + 727), + grpc_core::StaticMetadataSlice(&refcounts[49].base, 3, g_bytes + 730), + grpc_core::StaticMetadataSlice(&refcounts[50].base, 3, g_bytes + 733), + grpc_core::StaticMetadataSlice(&refcounts[51].base, 3, g_bytes + 736), + grpc_core::StaticMetadataSlice(&refcounts[52].base, 3, g_bytes + 739), + grpc_core::StaticMetadataSlice(&refcounts[53].base, 3, g_bytes + 742), + grpc_core::StaticMetadataSlice(&refcounts[54].base, 14, g_bytes + 745), + grpc_core::StaticMetadataSlice(&refcounts[55].base, 13, g_bytes + 759), + grpc_core::StaticMetadataSlice(&refcounts[56].base, 15, g_bytes + 772), + grpc_core::StaticMetadataSlice(&refcounts[57].base, 13, g_bytes + 787), + grpc_core::StaticMetadataSlice(&refcounts[58].base, 6, g_bytes + 800), + grpc_core::StaticMetadataSlice(&refcounts[59].base, 27, g_bytes + 806), + grpc_core::StaticMetadataSlice(&refcounts[60].base, 3, g_bytes + 833), + grpc_core::StaticMetadataSlice(&refcounts[61].base, 5, g_bytes + 836), + grpc_core::StaticMetadataSlice(&refcounts[62].base, 13, g_bytes + 841), + grpc_core::StaticMetadataSlice(&refcounts[63].base, 13, g_bytes + 854), + grpc_core::StaticMetadataSlice(&refcounts[64].base, 19, g_bytes + 867), + grpc_core::StaticMetadataSlice(&refcounts[65].base, 16, g_bytes + 886), + grpc_core::StaticMetadataSlice(&refcounts[66].base, 14, g_bytes + 902), + grpc_core::StaticMetadataSlice(&refcounts[67].base, 16, g_bytes + 916), + grpc_core::StaticMetadataSlice(&refcounts[68].base, 13, g_bytes + 932), + grpc_core::StaticMetadataSlice(&refcounts[69].base, 6, g_bytes + 945), + grpc_core::StaticMetadataSlice(&refcounts[70].base, 4, g_bytes + 951), + grpc_core::StaticMetadataSlice(&refcounts[71].base, 4, g_bytes + 955), + grpc_core::StaticMetadataSlice(&refcounts[72].base, 6, g_bytes + 959), + grpc_core::StaticMetadataSlice(&refcounts[73].base, 7, g_bytes + 965), + grpc_core::StaticMetadataSlice(&refcounts[74].base, 4, g_bytes + 972), + grpc_core::StaticMetadataSlice(&refcounts[75].base, 8, g_bytes + 976), + grpc_core::StaticMetadataSlice(&refcounts[76].base, 17, g_bytes + 984), + grpc_core::StaticMetadataSlice(&refcounts[77].base, 13, g_bytes + 1001), + grpc_core::StaticMetadataSlice(&refcounts[78].base, 8, g_bytes + 1014), + grpc_core::StaticMetadataSlice(&refcounts[79].base, 19, g_bytes + 1022), + grpc_core::StaticMetadataSlice(&refcounts[80].base, 13, g_bytes + 1041), + grpc_core::StaticMetadataSlice(&refcounts[81].base, 4, g_bytes + 1054), + grpc_core::StaticMetadataSlice(&refcounts[82].base, 8, g_bytes + 1058), + grpc_core::StaticMetadataSlice(&refcounts[83].base, 12, g_bytes + 1066), + grpc_core::StaticMetadataSlice(&refcounts[84].base, 18, g_bytes + 1078), + grpc_core::StaticMetadataSlice(&refcounts[85].base, 19, g_bytes + 1096), + grpc_core::StaticMetadataSlice(&refcounts[86].base, 5, g_bytes + 1115), + grpc_core::StaticMetadataSlice(&refcounts[87].base, 7, g_bytes + 1120), + grpc_core::StaticMetadataSlice(&refcounts[88].base, 7, g_bytes + 1127), + grpc_core::StaticMetadataSlice(&refcounts[89].base, 11, g_bytes + 1134), + grpc_core::StaticMetadataSlice(&refcounts[90].base, 6, g_bytes + 1145), + grpc_core::StaticMetadataSlice(&refcounts[91].base, 10, g_bytes + 1151), + grpc_core::StaticMetadataSlice(&refcounts[92].base, 25, g_bytes + 1161), + grpc_core::StaticMetadataSlice(&refcounts[93].base, 17, g_bytes + 1186), + grpc_core::StaticMetadataSlice(&refcounts[94].base, 4, g_bytes + 1203), + grpc_core::StaticMetadataSlice(&refcounts[95].base, 3, g_bytes + 1207), + grpc_core::StaticMetadataSlice(&refcounts[96].base, 16, g_bytes + 1210), + grpc_core::StaticMetadataSlice(&refcounts[97].base, 1, g_bytes + 1226), + grpc_core::StaticMetadataSlice(&refcounts[98].base, 8, g_bytes + 1227), + grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, g_bytes + 1235), + grpc_core::StaticMetadataSlice(&refcounts[100].base, 16, g_bytes + 1243), + grpc_core::StaticMetadataSlice(&refcounts[101].base, 4, g_bytes + 1259), + grpc_core::StaticMetadataSlice(&refcounts[102].base, 3, g_bytes + 1263), + grpc_core::StaticMetadataSlice(&refcounts[103].base, 11, g_bytes + 1266), + grpc_core::StaticMetadataSlice(&refcounts[104].base, 16, g_bytes + 1277), + grpc_core::StaticMetadataSlice(&refcounts[105].base, 13, g_bytes + 1293), + grpc_core::StaticMetadataSlice(&refcounts[106].base, 12, g_bytes + 1306), + grpc_core::StaticMetadataSlice(&refcounts[107].base, 21, g_bytes + 1318), }; StaticMetadata static_mdelem_table[GRPC_STATIC_MDELEM_COUNT] = { StaticMetadata( @@ -310,107 +305,107 @@ struct StaticMetadataCtx { 0), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[1].base, 7, g_bytes + 5), - grpc_core::StaticMetadataSlice(&refcounts[42].base, 3, g_bytes + 750), + grpc_core::StaticMetadataSlice(&refcounts[41].base, 3, g_bytes + 696), 1), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[1].base, 7, g_bytes + 5), - grpc_core::StaticMetadataSlice(&refcounts[43].base, 4, g_bytes + 753), + grpc_core::StaticMetadataSlice(&refcounts[42].base, 4, g_bytes + 699), 2), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[0].base, 5, g_bytes + 0), - grpc_core::StaticMetadataSlice(&refcounts[44].base, 1, g_bytes + 757), + grpc_core::StaticMetadataSlice(&refcounts[43].base, 1, g_bytes + 703), 3), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[0].base, 5, g_bytes + 0), - grpc_core::StaticMetadataSlice(&refcounts[45].base, 11, - g_bytes + 758), + grpc_core::StaticMetadataSlice(&refcounts[44].base, 11, + g_bytes + 704), 4), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[4].base, 7, g_bytes + 29), - grpc_core::StaticMetadataSlice(&refcounts[46].base, 4, g_bytes + 769), + grpc_core::StaticMetadataSlice(&refcounts[45].base, 4, g_bytes + 715), 5), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[4].base, 7, g_bytes + 29), - grpc_core::StaticMetadataSlice(&refcounts[47].base, 5, g_bytes + 773), + grpc_core::StaticMetadataSlice(&refcounts[46].base, 5, g_bytes + 719), 6), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12), - grpc_core::StaticMetadataSlice(&refcounts[48].base, 3, g_bytes + 778), + grpc_core::StaticMetadataSlice(&refcounts[47].base, 3, g_bytes + 724), 7), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12), - grpc_core::StaticMetadataSlice(&refcounts[49].base, 3, g_bytes + 781), + grpc_core::StaticMetadataSlice(&refcounts[48].base, 3, g_bytes + 727), 8), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12), - grpc_core::StaticMetadataSlice(&refcounts[50].base, 3, g_bytes + 784), + grpc_core::StaticMetadataSlice(&refcounts[49].base, 3, g_bytes + 730), 9), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12), - grpc_core::StaticMetadataSlice(&refcounts[51].base, 3, g_bytes + 787), + grpc_core::StaticMetadataSlice(&refcounts[50].base, 3, g_bytes + 733), 10), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12), - grpc_core::StaticMetadataSlice(&refcounts[52].base, 3, g_bytes + 790), + grpc_core::StaticMetadataSlice(&refcounts[51].base, 3, g_bytes + 736), 11), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12), - grpc_core::StaticMetadataSlice(&refcounts[53].base, 3, g_bytes + 793), + grpc_core::StaticMetadataSlice(&refcounts[52].base, 3, g_bytes + 739), 12), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12), - grpc_core::StaticMetadataSlice(&refcounts[54].base, 3, g_bytes + 796), + grpc_core::StaticMetadataSlice(&refcounts[53].base, 3, g_bytes + 742), 13), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[55].base, 14, - g_bytes + 799), + grpc_core::StaticMetadataSlice(&refcounts[54].base, 14, + g_bytes + 745), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 14), StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[16].base, 15, g_bytes + 186), - grpc_core::StaticMetadataSlice(&refcounts[56].base, 13, - g_bytes + 813), + grpc_core::StaticMetadataSlice(&refcounts[55].base, 13, + g_bytes + 759), 15), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[57].base, 15, - g_bytes + 826), + grpc_core::StaticMetadataSlice(&refcounts[56].base, 15, + g_bytes + 772), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 16), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[58].base, 13, - g_bytes + 841), + grpc_core::StaticMetadataSlice(&refcounts[57].base, 13, + g_bytes + 787), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 17), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[59].base, 6, g_bytes + 854), + grpc_core::StaticMetadataSlice(&refcounts[58].base, 6, g_bytes + 800), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 18), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[60].base, 27, - g_bytes + 860), + grpc_core::StaticMetadataSlice(&refcounts[59].base, 27, + g_bytes + 806), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 19), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[61].base, 3, g_bytes + 887), + grpc_core::StaticMetadataSlice(&refcounts[60].base, 3, g_bytes + 833), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 20), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[62].base, 5, g_bytes + 890), + grpc_core::StaticMetadataSlice(&refcounts[61].base, 5, g_bytes + 836), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 21), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[63].base, 13, - g_bytes + 895), + grpc_core::StaticMetadataSlice(&refcounts[62].base, 13, + g_bytes + 841), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 22), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[64].base, 13, - g_bytes + 908), + grpc_core::StaticMetadataSlice(&refcounts[63].base, 13, + g_bytes + 854), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 23), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[65].base, 19, - g_bytes + 921), + grpc_core::StaticMetadataSlice(&refcounts[64].base, 19, + g_bytes + 867), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 24), StaticMetadata( @@ -419,23 +414,23 @@ struct StaticMetadataCtx { grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 25), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[66].base, 16, - g_bytes + 940), + grpc_core::StaticMetadataSlice(&refcounts[65].base, 16, + g_bytes + 886), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 26), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[67].base, 14, - g_bytes + 956), + grpc_core::StaticMetadataSlice(&refcounts[66].base, 14, + g_bytes + 902), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 27), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[68].base, 16, - g_bytes + 970), + grpc_core::StaticMetadataSlice(&refcounts[67].base, 16, + g_bytes + 916), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 28), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[69].base, 13, - g_bytes + 986), + grpc_core::StaticMetadataSlice(&refcounts[68].base, 13, + g_bytes + 932), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 29), StaticMetadata( @@ -444,32 +439,27 @@ struct StaticMetadataCtx { grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 30), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[70].base, 6, g_bytes + 999), + grpc_core::StaticMetadataSlice(&refcounts[69].base, 6, g_bytes + 945), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 31), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[71].base, 4, - g_bytes + 1005), + grpc_core::StaticMetadataSlice(&refcounts[70].base, 4, g_bytes + 951), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 32), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[72].base, 4, - g_bytes + 1009), + grpc_core::StaticMetadataSlice(&refcounts[71].base, 4, g_bytes + 955), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 33), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[73].base, 6, - g_bytes + 1013), + grpc_core::StaticMetadataSlice(&refcounts[72].base, 6, g_bytes + 959), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 34), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[74].base, 7, - g_bytes + 1019), + grpc_core::StaticMetadataSlice(&refcounts[73].base, 7, g_bytes + 965), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 35), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[75].base, 4, - g_bytes + 1026), + grpc_core::StaticMetadataSlice(&refcounts[74].base, 4, g_bytes + 972), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 36), StaticMetadata( @@ -477,98 +467,97 @@ struct StaticMetadataCtx { grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 37), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[76].base, 8, - g_bytes + 1030), + grpc_core::StaticMetadataSlice(&refcounts[75].base, 8, g_bytes + 976), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 38), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[77].base, 17, - g_bytes + 1038), + grpc_core::StaticMetadataSlice(&refcounts[76].base, 17, + g_bytes + 984), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 39), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[78].base, 13, - g_bytes + 1055), + grpc_core::StaticMetadataSlice(&refcounts[77].base, 13, + g_bytes + 1001), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 40), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[79].base, 8, - g_bytes + 1068), + grpc_core::StaticMetadataSlice(&refcounts[78].base, 8, + g_bytes + 1014), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 41), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[80].base, 19, - g_bytes + 1076), + grpc_core::StaticMetadataSlice(&refcounts[79].base, 19, + g_bytes + 1022), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 42), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[81].base, 13, - g_bytes + 1095), + grpc_core::StaticMetadataSlice(&refcounts[80].base, 13, + g_bytes + 1041), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 43), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[82].base, 4, - g_bytes + 1108), + grpc_core::StaticMetadataSlice(&refcounts[81].base, 4, + g_bytes + 1054), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 44), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[83].base, 8, - g_bytes + 1112), + grpc_core::StaticMetadataSlice(&refcounts[82].base, 8, + g_bytes + 1058), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 45), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[84].base, 12, - g_bytes + 1120), + grpc_core::StaticMetadataSlice(&refcounts[83].base, 12, + g_bytes + 1066), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 46), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[85].base, 18, - g_bytes + 1132), + grpc_core::StaticMetadataSlice(&refcounts[84].base, 18, + g_bytes + 1078), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 47), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[86].base, 19, - g_bytes + 1150), + grpc_core::StaticMetadataSlice(&refcounts[85].base, 19, + g_bytes + 1096), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 48), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[87].base, 5, - g_bytes + 1169), + grpc_core::StaticMetadataSlice(&refcounts[86].base, 5, + g_bytes + 1115), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 49), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[88].base, 7, - g_bytes + 1174), + grpc_core::StaticMetadataSlice(&refcounts[87].base, 7, + g_bytes + 1120), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 50), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[89].base, 7, - g_bytes + 1181), + grpc_core::StaticMetadataSlice(&refcounts[88].base, 7, + g_bytes + 1127), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 51), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[90].base, 11, - g_bytes + 1188), + grpc_core::StaticMetadataSlice(&refcounts[89].base, 11, + g_bytes + 1134), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 52), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[91].base, 6, - g_bytes + 1199), + grpc_core::StaticMetadataSlice(&refcounts[90].base, 6, + g_bytes + 1145), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 53), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[92].base, 10, - g_bytes + 1205), + grpc_core::StaticMetadataSlice(&refcounts[91].base, 10, + g_bytes + 1151), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 54), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[93].base, 25, - g_bytes + 1215), + grpc_core::StaticMetadataSlice(&refcounts[92].base, 25, + g_bytes + 1161), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 55), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[94].base, 17, - g_bytes + 1240), + grpc_core::StaticMetadataSlice(&refcounts[93].base, 17, + g_bytes + 1186), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 56), StaticMetadata( @@ -577,24 +566,24 @@ struct StaticMetadataCtx { grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 57), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[95].base, 4, - g_bytes + 1257), + grpc_core::StaticMetadataSlice(&refcounts[94].base, 4, + g_bytes + 1203), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 58), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[96].base, 3, - g_bytes + 1261), + grpc_core::StaticMetadataSlice(&refcounts[95].base, 3, + g_bytes + 1207), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 59), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[97].base, 16, - g_bytes + 1264), + grpc_core::StaticMetadataSlice(&refcounts[96].base, 16, + g_bytes + 1210), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 60), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[7].base, 11, g_bytes + 50), - grpc_core::StaticMetadataSlice(&refcounts[98].base, 1, - g_bytes + 1280), + grpc_core::StaticMetadataSlice(&refcounts[97].base, 1, + g_bytes + 1226), 61), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[7].base, 11, g_bytes + 50), @@ -606,36 +595,36 @@ struct StaticMetadataCtx { 63), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[9].base, 13, g_bytes + 77), - grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, - g_bytes + 1281), + grpc_core::StaticMetadataSlice(&refcounts[98].base, 8, + g_bytes + 1227), 64), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[9].base, 13, g_bytes + 77), - grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735), + grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 681), 65), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[9].base, 13, g_bytes + 77), - grpc_core::StaticMetadataSlice(&refcounts[39].base, 7, g_bytes + 728), + grpc_core::StaticMetadataSlice(&refcounts[38].base, 7, g_bytes + 674), 66), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[5].base, 2, g_bytes + 36), - grpc_core::StaticMetadataSlice(&refcounts[100].base, 8, - g_bytes + 1289), + grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, + g_bytes + 1235), 67), StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[14].base, 12, g_bytes + 158), - grpc_core::StaticMetadataSlice(&refcounts[101].base, 16, - g_bytes + 1297), + grpc_core::StaticMetadataSlice(&refcounts[100].base, 16, + g_bytes + 1243), 68), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[4].base, 7, g_bytes + 29), - grpc_core::StaticMetadataSlice(&refcounts[102].base, 4, - g_bytes + 1313), + grpc_core::StaticMetadataSlice(&refcounts[101].base, 4, + g_bytes + 1259), 69), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[1].base, 7, g_bytes + 5), - grpc_core::StaticMetadataSlice(&refcounts[103].base, 3, - g_bytes + 1317), + grpc_core::StaticMetadataSlice(&refcounts[102].base, 3, + g_bytes + 1263), 70), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[16].base, 15, @@ -644,66 +633,66 @@ struct StaticMetadataCtx { 71), StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[15].base, 16, g_bytes + 170), - grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, - g_bytes + 1281), + grpc_core::StaticMetadataSlice(&refcounts[98].base, 8, + g_bytes + 1227), 72), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[15].base, 16, g_bytes + 170), - grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735), + grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 681), 73), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[104].base, 11, - g_bytes + 1320), + grpc_core::StaticMetadataSlice(&refcounts[103].base, 11, + g_bytes + 1266), grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 74), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90), - grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, - g_bytes + 1281), + grpc_core::StaticMetadataSlice(&refcounts[98].base, 8, + g_bytes + 1227), 75), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90), - grpc_core::StaticMetadataSlice(&refcounts[39].base, 7, g_bytes + 728), + grpc_core::StaticMetadataSlice(&refcounts[38].base, 7, g_bytes + 674), 76), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90), - grpc_core::StaticMetadataSlice(&refcounts[105].base, 16, - g_bytes + 1331), + grpc_core::StaticMetadataSlice(&refcounts[104].base, 16, + g_bytes + 1277), 77), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90), - grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735), + grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 681), 78), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90), - grpc_core::StaticMetadataSlice(&refcounts[106].base, 13, - g_bytes + 1347), + grpc_core::StaticMetadataSlice(&refcounts[105].base, 13, + g_bytes + 1293), 79), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90), - grpc_core::StaticMetadataSlice(&refcounts[107].base, 12, - g_bytes + 1360), + grpc_core::StaticMetadataSlice(&refcounts[106].base, 12, + g_bytes + 1306), 80), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90), - grpc_core::StaticMetadataSlice(&refcounts[108].base, 21, - g_bytes + 1372), + grpc_core::StaticMetadataSlice(&refcounts[107].base, 21, + g_bytes + 1318), 81), StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[16].base, 15, g_bytes + 186), - grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, - g_bytes + 1281), + grpc_core::StaticMetadataSlice(&refcounts[98].base, 8, + g_bytes + 1227), 82), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[16].base, 15, g_bytes + 186), - grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735), + grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 681), 83), StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[16].base, 15, g_bytes + 186), - grpc_core::StaticMetadataSlice(&refcounts[106].base, 13, - g_bytes + 1347), + grpc_core::StaticMetadataSlice(&refcounts[105].base, 13, + g_bytes + 1293), 84), }; @@ -1189,17 +1178,17 @@ uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 6, 6, 8, 8, 2, 4, 4}; static const int8_t elems_r[] = { - 15, 10, -8, 0, 2, -43, -81, -44, 0, 4, -8, 0, 0, 0, 6, -1, - -8, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -67, 0, -38, -50, -56, -76, 0, 46, 28, - 27, 26, 25, 24, 23, 23, 22, 21, 20, 19, 24, 16, 15, 14, 13, 15, - 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 6, 5, 4, 3, 2, 3, - 2, 2, 6, 0, 0, 0, 0, 0, 0, -6, 0}; + 15, 10, -8, 0, 2, -43, -82, -43, 0, 4, -8, 0, 0, 0, 8, -2, + -9, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -66, 0, -69, -70, -51, -73, 0, 32, 31, 30, + 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 16, + 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 3, 2, + 2, 7, 0, 0, 0, 0, 0, 0, -6, 0}; static uint32_t elems_phash(uint32_t i) { - i -= 44; - uint32_t x = i % 107; - uint32_t y = i / 107; + i -= 43; + uint32_t x = i % 106; + uint32_t y = i / 106; uint32_t h = x; if (y < GPR_ARRAY_SIZE(elems_r)) { uint32_t delta = (uint32_t)elems_r[y]; @@ -1209,26 +1198,25 @@ static uint32_t elems_phash(uint32_t i) { } static const uint16_t elem_keys[] = { - 266, 267, 268, 269, 270, 271, 272, 1129, 1130, 1773, 151, - 152, 482, 483, 1664, 44, 45, 1020, 1021, 1555, 1784, 788, - 789, 645, 861, 1675, 2100, 2209, 6024, 6569, 6787, 6896, 7005, - 7114, 7223, 7332, 1800, 7441, 7550, 7659, 7768, 7877, 8095, 8204, - 8313, 8422, 6678, 6460, 7986, 8531, 8640, 6351, 8749, 8858, 8967, - 9076, 9185, 9294, 9403, 9512, 9621, 6242, 9730, 9839, 9948, 10057, - 10166, 1189, 538, 10275, 10384, 212, 10493, 1195, 1196, 1197, 1198, - 1080, 10602, 1843, 11365, 0, 0, 0, 1734, 0, 1850, 0, - 0, 0, 356, 1627}; + 263, 264, 265, 266, 267, 268, 269, 1118, 1119, 1757, 149, 150, + 477, 478, 1649, 43, 44, 1010, 1011, 1767, 781, 782, 1541, 639, + 1659, 853, 2081, 2189, 5861, 6077, 6185, 6401, 6509, 6617, 6725, 1783, + 6833, 6941, 7049, 7157, 7265, 7373, 7481, 7589, 7697, 7805, 7913, 8021, + 8129, 8237, 8345, 6293, 8453, 8561, 8669, 8777, 8885, 8993, 9101, 9209, + 9317, 9425, 9533, 9641, 9749, 9857, 9965, 1178, 533, 10073, 10181, 210, + 10289, 1184, 1185, 1186, 1187, 1070, 1826, 10397, 11153, 0, 0, 1718, + 0, 1833, 0, 0, 0, 0, 353, 0, 0, 1612}; static const uint8_t elem_idxs[] = { - 7, 8, 9, 10, 11, 12, 13, 76, 78, 71, 1, 2, 5, 6, 25, 3, - 4, 66, 65, 30, 83, 62, 63, 67, 61, 73, 57, 37, 14, 19, 21, 22, - 23, 24, 26, 27, 15, 28, 29, 31, 32, 33, 35, 36, 38, 39, 20, 18, - 34, 40, 41, 17, 42, 43, 44, 45, 46, 47, 48, 49, 50, 16, 51, 52, - 53, 54, 55, 75, 69, 56, 58, 70, 59, 77, 79, 80, 81, 64, 60, 82, - 74, 255, 255, 255, 72, 255, 84, 255, 255, 255, 0, 68}; + 7, 8, 9, 10, 11, 12, 13, 76, 78, 71, 1, 2, 5, 6, 25, 3, + 4, 66, 65, 83, 62, 63, 30, 67, 73, 61, 57, 37, 14, 16, 17, 19, + 20, 21, 22, 15, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, + 38, 39, 40, 18, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 75, 69, 56, 58, 70, 59, 77, 79, 80, 81, 64, 82, 60, + 74, 255, 255, 72, 255, 84, 255, 255, 255, 255, 0, 255, 255, 68}; grpc_mdelem grpc_static_mdelem_for_static_strings(intptr_t a, intptr_t b) { if (a == -1 || b == -1) return GRPC_MDNULL; - uint32_t k = static_cast<uint32_t>(a * 109 + b); + uint32_t k = static_cast<uint32_t>(a * 108 + b); uint32_t h = elems_phash(k); return h < GPR_ARRAY_SIZE(elem_keys) && elem_keys[h] == k && elem_idxs[h] != 255 diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h index 391c6a7c4abd7453b701550c0cfaee6d28c09ccf..e88cf9f592affcd55c7d76211da77cec1e62568e 100644 --- a/src/core/lib/transport/static_metadata.h +++ b/src/core/lib/transport/static_metadata.h @@ -36,7 +36,7 @@ static_assert( std::is_trivially_destructible<grpc_core::StaticMetadataSlice>::value, "grpc_core::StaticMetadataSlice must be trivially destructible."); -#define GRPC_STATIC_MDSTR_COUNT 109 +#define GRPC_STATIC_MDSTR_COUNT 108 void grpc_init_static_metadata_ctx(void); void grpc_destroy_static_metadata_ctx(void); @@ -132,157 +132,154 @@ inline const grpc_core::StaticMetadataSlice* grpc_static_slice_table() { /* "/envoy.service.load_stats.v2.LoadReportingService/StreamLoadStats" */ #define GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_LOAD_STATS_DOT_V2_DOT_LOADREPORTINGSERVICE_SLASH_STREAMLOADSTATS \ (grpc_static_slice_table()[35]) -/* "/envoy.api.v2.EndpointDiscoveryService/StreamEndpoints" */ -#define GRPC_MDSTR_SLASH_ENVOY_DOT_API_DOT_V2_DOT_ENDPOINTDISCOVERYSERVICE_SLASH_STREAMENDPOINTS \ - (grpc_static_slice_table()[36]) /* "/grpc.health.v1.Health/Watch" */ #define GRPC_MDSTR_SLASH_GRPC_DOT_HEALTH_DOT_V1_DOT_HEALTH_SLASH_WATCH \ - (grpc_static_slice_table()[37]) + (grpc_static_slice_table()[36]) /* "/envoy.service.discovery.v2.AggregatedDiscoveryService/StreamAggregatedResources" */ #define GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_DISCOVERY_DOT_V2_DOT_AGGREGATEDDISCOVERYSERVICE_SLASH_STREAMAGGREGATEDRESOURCES \ - (grpc_static_slice_table()[38]) + (grpc_static_slice_table()[37]) /* "deflate" */ -#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table()[39]) +#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table()[38]) /* "gzip" */ -#define GRPC_MDSTR_GZIP (grpc_static_slice_table()[40]) +#define GRPC_MDSTR_GZIP (grpc_static_slice_table()[39]) /* "stream/gzip" */ -#define GRPC_MDSTR_STREAM_SLASH_GZIP (grpc_static_slice_table()[41]) +#define GRPC_MDSTR_STREAM_SLASH_GZIP (grpc_static_slice_table()[40]) /* "GET" */ -#define GRPC_MDSTR_GET (grpc_static_slice_table()[42]) +#define GRPC_MDSTR_GET (grpc_static_slice_table()[41]) /* "POST" */ -#define GRPC_MDSTR_POST (grpc_static_slice_table()[43]) +#define GRPC_MDSTR_POST (grpc_static_slice_table()[42]) /* "/" */ -#define GRPC_MDSTR_SLASH (grpc_static_slice_table()[44]) +#define GRPC_MDSTR_SLASH (grpc_static_slice_table()[43]) /* "/index.html" */ -#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table()[45]) +#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table()[44]) /* "http" */ -#define GRPC_MDSTR_HTTP (grpc_static_slice_table()[46]) +#define GRPC_MDSTR_HTTP (grpc_static_slice_table()[45]) /* "https" */ -#define GRPC_MDSTR_HTTPS (grpc_static_slice_table()[47]) +#define GRPC_MDSTR_HTTPS (grpc_static_slice_table()[46]) /* "200" */ -#define GRPC_MDSTR_200 (grpc_static_slice_table()[48]) +#define GRPC_MDSTR_200 (grpc_static_slice_table()[47]) /* "204" */ -#define GRPC_MDSTR_204 (grpc_static_slice_table()[49]) +#define GRPC_MDSTR_204 (grpc_static_slice_table()[48]) /* "206" */ -#define GRPC_MDSTR_206 (grpc_static_slice_table()[50]) +#define GRPC_MDSTR_206 (grpc_static_slice_table()[49]) /* "304" */ -#define GRPC_MDSTR_304 (grpc_static_slice_table()[51]) +#define GRPC_MDSTR_304 (grpc_static_slice_table()[50]) /* "400" */ -#define GRPC_MDSTR_400 (grpc_static_slice_table()[52]) +#define GRPC_MDSTR_400 (grpc_static_slice_table()[51]) /* "404" */ -#define GRPC_MDSTR_404 (grpc_static_slice_table()[53]) +#define GRPC_MDSTR_404 (grpc_static_slice_table()[52]) /* "500" */ -#define GRPC_MDSTR_500 (grpc_static_slice_table()[54]) +#define GRPC_MDSTR_500 (grpc_static_slice_table()[53]) /* "accept-charset" */ -#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table()[55]) +#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table()[54]) /* "gzip, deflate" */ -#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table()[56]) +#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table()[55]) /* "accept-language" */ -#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table()[57]) +#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table()[56]) /* "accept-ranges" */ -#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table()[58]) +#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table()[57]) /* "accept" */ -#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table()[59]) +#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table()[58]) /* "access-control-allow-origin" */ -#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table()[60]) +#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table()[59]) /* "age" */ -#define GRPC_MDSTR_AGE (grpc_static_slice_table()[61]) +#define GRPC_MDSTR_AGE (grpc_static_slice_table()[60]) /* "allow" */ -#define GRPC_MDSTR_ALLOW (grpc_static_slice_table()[62]) +#define GRPC_MDSTR_ALLOW (grpc_static_slice_table()[61]) /* "authorization" */ -#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table()[63]) +#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table()[62]) /* "cache-control" */ -#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table()[64]) +#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table()[63]) /* "content-disposition" */ -#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table()[65]) +#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table()[64]) /* "content-language" */ -#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table()[66]) +#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table()[65]) /* "content-length" */ -#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table()[67]) +#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table()[66]) /* "content-location" */ -#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table()[68]) +#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table()[67]) /* "content-range" */ -#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table()[69]) +#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table()[68]) /* "cookie" */ -#define GRPC_MDSTR_COOKIE (grpc_static_slice_table()[70]) +#define GRPC_MDSTR_COOKIE (grpc_static_slice_table()[69]) /* "date" */ -#define GRPC_MDSTR_DATE (grpc_static_slice_table()[71]) +#define GRPC_MDSTR_DATE (grpc_static_slice_table()[70]) /* "etag" */ -#define GRPC_MDSTR_ETAG (grpc_static_slice_table()[72]) +#define GRPC_MDSTR_ETAG (grpc_static_slice_table()[71]) /* "expect" */ -#define GRPC_MDSTR_EXPECT (grpc_static_slice_table()[73]) +#define GRPC_MDSTR_EXPECT (grpc_static_slice_table()[72]) /* "expires" */ -#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table()[74]) +#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table()[73]) /* "from" */ -#define GRPC_MDSTR_FROM (grpc_static_slice_table()[75]) +#define GRPC_MDSTR_FROM (grpc_static_slice_table()[74]) /* "if-match" */ -#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table()[76]) +#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table()[75]) /* "if-modified-since" */ -#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table()[77]) +#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table()[76]) /* "if-none-match" */ -#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table()[78]) +#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table()[77]) /* "if-range" */ -#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table()[79]) +#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table()[78]) /* "if-unmodified-since" */ -#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table()[80]) +#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table()[79]) /* "last-modified" */ -#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table()[81]) +#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table()[80]) /* "link" */ -#define GRPC_MDSTR_LINK (grpc_static_slice_table()[82]) +#define GRPC_MDSTR_LINK (grpc_static_slice_table()[81]) /* "location" */ -#define GRPC_MDSTR_LOCATION (grpc_static_slice_table()[83]) +#define GRPC_MDSTR_LOCATION (grpc_static_slice_table()[82]) /* "max-forwards" */ -#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table()[84]) +#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table()[83]) /* "proxy-authenticate" */ -#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table()[85]) +#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table()[84]) /* "proxy-authorization" */ -#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table()[86]) +#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table()[85]) /* "range" */ -#define GRPC_MDSTR_RANGE (grpc_static_slice_table()[87]) +#define GRPC_MDSTR_RANGE (grpc_static_slice_table()[86]) /* "referer" */ -#define GRPC_MDSTR_REFERER (grpc_static_slice_table()[88]) +#define GRPC_MDSTR_REFERER (grpc_static_slice_table()[87]) /* "refresh" */ -#define GRPC_MDSTR_REFRESH (grpc_static_slice_table()[89]) +#define GRPC_MDSTR_REFRESH (grpc_static_slice_table()[88]) /* "retry-after" */ -#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table()[90]) +#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table()[89]) /* "server" */ -#define GRPC_MDSTR_SERVER (grpc_static_slice_table()[91]) +#define GRPC_MDSTR_SERVER (grpc_static_slice_table()[90]) /* "set-cookie" */ -#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table()[92]) +#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table()[91]) /* "strict-transport-security" */ -#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table()[93]) +#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table()[92]) /* "transfer-encoding" */ -#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table()[94]) +#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table()[93]) /* "vary" */ -#define GRPC_MDSTR_VARY (grpc_static_slice_table()[95]) +#define GRPC_MDSTR_VARY (grpc_static_slice_table()[94]) /* "via" */ -#define GRPC_MDSTR_VIA (grpc_static_slice_table()[96]) +#define GRPC_MDSTR_VIA (grpc_static_slice_table()[95]) /* "www-authenticate" */ -#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table()[97]) +#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table()[96]) /* "0" */ -#define GRPC_MDSTR_0 (grpc_static_slice_table()[98]) +#define GRPC_MDSTR_0 (grpc_static_slice_table()[97]) /* "identity" */ -#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table()[99]) +#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table()[98]) /* "trailers" */ -#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table()[100]) +#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table()[99]) /* "application/grpc" */ -#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table()[101]) +#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table()[100]) /* "grpc" */ -#define GRPC_MDSTR_GRPC (grpc_static_slice_table()[102]) +#define GRPC_MDSTR_GRPC (grpc_static_slice_table()[101]) /* "PUT" */ -#define GRPC_MDSTR_PUT (grpc_static_slice_table()[103]) +#define GRPC_MDSTR_PUT (grpc_static_slice_table()[102]) /* "lb-cost-bin" */ -#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table()[104]) +#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table()[103]) /* "identity,deflate" */ -#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table()[105]) +#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table()[104]) /* "identity,gzip" */ -#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table()[106]) +#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table()[105]) /* "deflate,gzip" */ -#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table()[107]) +#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table()[106]) /* "identity,deflate,gzip" */ #define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \ - (grpc_static_slice_table()[108]) + (grpc_static_slice_table()[107]) namespace grpc_core { struct StaticSliceRefcount; diff --git a/src/proto/grpc/testing/xds/BUILD b/src/proto/grpc/testing/xds/BUILD index 8336d5c508a9ebbab2ac817c30cc3c11789e7968..b9fb013512b0135f99f27043f2851b6706a57e9e 100644 --- a/src/proto/grpc/testing/xds/BUILD +++ b/src/proto/grpc/testing/xds/BUILD @@ -21,6 +21,15 @@ grpc_package( visibility = "public", ) +grpc_proto_library( + name = "ads_for_test_proto", + srcs = [ + "ads_for_test.proto", + ], + has_services = True, + deps = ["eds_for_test_proto"], +) + grpc_proto_library( name = "eds_for_test_proto", srcs = [ diff --git a/src/proto/grpc/testing/xds/ads_for_test.proto b/src/proto/grpc/testing/xds/ads_for_test.proto new file mode 100644 index 0000000000000000000000000000000000000000..0d308fbbeac5dbb43dfcd3ff6d0042d5fb64c160 --- /dev/null +++ b/src/proto/grpc/testing/xds/ads_for_test.proto @@ -0,0 +1,51 @@ +// Copyright 2019 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file contains the eds protocol and its dependency. +// +// TODO(juanlishen): This file is a hack to avoid a problem we're +// currently having where we can't depend on a proto file in an external +// repo due to bazel limitations. Once that's fixed, this should be +// removed. Until this, it should be used in the gRPC tests only, or else it +// will cause a conflict due to the same proto messages being defined in +// multiple files in the same binary. + +syntax = "proto3"; + +package envoy.service.discovery.v2; + +import "src/proto/grpc/testing/xds/eds_for_test.proto"; + +// [#not-implemented-hide:] Discovery services for endpoints, clusters, routes, +// and listeners are retained in the package `envoy.api.v2` for backwards +// compatibility with existing management servers. New development in discovery +// services should proceed in the package `envoy.service.discovery.v2`. + +// See https://github.com/lyft/envoy-api#apis for a description of the role of +// ADS and how it is intended to be used by a management server. ADS requests +// have the same structure as their singleton xDS counterparts, but can +// multiplex many resource types on a single stream. The type_url in the +// DiscoveryRequest/DiscoveryResponse provides sufficient information to recover +// the multiplexed singleton APIs at the Envoy instance and management server. +service AggregatedDiscoveryService { + // This is a gRPC-only API. + rpc StreamAggregatedResources(stream envoy.api.v2.DiscoveryRequest) + returns (stream envoy.api.v2.DiscoveryResponse) { + } + + // Commented out so that we don't have to copy the request/response protos. +// rpc DeltaAggregatedResources(stream api.v2.DeltaDiscoveryRequest) +// returns (stream api.v2.DeltaDiscoveryResponse) { +// } +} diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary index bc621ca2a118de8b7d31f5fbdf71a34f9ae0f083..941d49a32bab15581701e52c70808d1ec220b2b1 100644 --- a/test/core/end2end/fuzzers/hpack.dictionary +++ b/test/core/end2end/fuzzers/hpack.dictionary @@ -35,7 +35,6 @@ "\x1Fgrpc.max_response_message_bytes" "$/grpc.lb.v1.LoadBalancer/BalanceLoad" "A/envoy.service.load_stats.v2.LoadReportingService/StreamLoadStats" -"6/envoy.api.v2.EndpointDiscoveryService/StreamEndpoints" "\x1C/grpc.health.v1.Health/Watch" "P/envoy.service.discovery.v2.AggregatedDiscoveryService/StreamAggregatedResources" "\x07deflate" diff --git a/test/cpp/end2end/BUILD b/test/cpp/end2end/BUILD index 7139548f803c463e7a5b7e01a388e8915e27baf0..0e4f5467da640ba83e61d3b3ed4b426110d3b67d 100644 --- a/test/cpp/end2end/BUILD +++ b/test/cpp/end2end/BUILD @@ -499,6 +499,7 @@ grpc_cc_test( "//:grpc", "//:grpc++", "//:grpc_resolver_fake", + "//src/proto/grpc/testing/xds:ads_for_test_proto", "//src/proto/grpc/testing/xds:eds_for_test_proto", "//src/proto/grpc/testing/xds:lrs_for_test_proto", "//src/proto/grpc/testing:echo_messages_proto", diff --git a/test/cpp/end2end/xds_end2end_test.cc b/test/cpp/end2end/xds_end2end_test.cc index ccfdcf3171ce7e017b59a20f43504c9d24084157..2a4ec1fad3a487bcea8431cac7a3c6509ad85fac 100644 --- a/test/cpp/end2end/xds_end2end_test.cc +++ b/test/cpp/end2end/xds_end2end_test.cc @@ -52,6 +52,7 @@ #include "test/cpp/end2end/test_service_impl.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" +#include "src/proto/grpc/testing/xds/ads_for_test.grpc.pb.h" #include "src/proto/grpc/testing/xds/eds_for_test.grpc.pb.h" #include "src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.h" @@ -84,8 +85,8 @@ using std::chrono::system_clock; using ::envoy::api::v2::ClusterLoadAssignment; using ::envoy::api::v2::DiscoveryRequest; using ::envoy::api::v2::DiscoveryResponse; -using ::envoy::api::v2::EndpointDiscoveryService; using ::envoy::api::v2::FractionalPercent; +using ::envoy::service::discovery::v2::AggregatedDiscoveryService; using ::envoy::service::load_stats::v2::ClusterStats; using ::envoy::service::load_stats::v2::LoadReportingService; using ::envoy::service::load_stats::v2::LoadStatsRequest; @@ -138,7 +139,7 @@ class CountedService : public ServiceType { }; using BackendService = CountedService<TestServiceImpl>; -using EdsService = CountedService<EndpointDiscoveryService::Service>; +using AdsService = CountedService<AggregatedDiscoveryService::Service>; using LrsService = CountedService<LoadReportingService::Service>; const char g_kCallCredsMdKey[] = "Balancer should not ..."; @@ -258,7 +259,8 @@ class ClientStats { std::map<grpc::string, uint64_t> dropped_requests_; }; -class EdsServiceImpl : public EdsService { +// Only the EDS functionality is implemented. +class AdsServiceImpl : public AdsService { public: struct ResponseArgs { struct Locality { @@ -289,12 +291,13 @@ class EdsServiceImpl : public EdsService { using Stream = ServerReaderWriter<DiscoveryResponse, DiscoveryRequest>; using ResponseDelayPair = std::pair<DiscoveryResponse, int>; - Status StreamEndpoints(ServerContext* context, Stream* stream) override { - gpr_log(GPR_INFO, "LB[%p]: EDS StreamEndpoints starts", this); + Status StreamAggregatedResources(ServerContext* context, + Stream* stream) override { + gpr_log(GPR_INFO, "LB[%p]: ADS StreamAggregatedResources starts", this); [&]() { { - grpc_core::MutexLock lock(&eds_mu_); - if (eds_done_) return; + grpc_core::MutexLock lock(&ads_mu_); + if (ads_done_) return; } // Balancer shouldn't receive the call credentials metadata. EXPECT_EQ(context->client_metadata().find(g_kCallCredsMdKey), @@ -308,7 +311,7 @@ class EdsServiceImpl : public EdsService { // Send response. std::vector<ResponseDelayPair> responses_and_delays; { - grpc_core::MutexLock lock(&eds_mu_); + grpc_core::MutexLock lock(&ads_mu_); responses_and_delays = responses_and_delays_; } for (const auto& response_and_delay : responses_and_delays) { @@ -316,28 +319,28 @@ class EdsServiceImpl : public EdsService { response_and_delay.second); } // Wait until notified done. - grpc_core::MutexLock lock(&eds_mu_); - eds_cond_.WaitUntil(&eds_mu_, [this] { return eds_done_; }); + grpc_core::MutexLock lock(&ads_mu_); + ads_cond_.WaitUntil(&ads_mu_, [this] { return ads_done_; }); }(); - gpr_log(GPR_INFO, "LB[%p]: EDS StreamEndpoints done", this); + gpr_log(GPR_INFO, "LB[%p]: ADS StreamAggregatedResources done", this); return Status::OK; } void add_response(const DiscoveryResponse& response, int send_after_ms) { - grpc_core::MutexLock lock(&eds_mu_); + grpc_core::MutexLock lock(&ads_mu_); responses_and_delays_.push_back(std::make_pair(response, send_after_ms)); } void Start() { - grpc_core::MutexLock lock(&eds_mu_); - eds_done_ = false; + grpc_core::MutexLock lock(&ads_mu_); + ads_done_ = false; responses_and_delays_.clear(); } void Shutdown() { { - grpc_core::MutexLock lock(&eds_mu_); - NotifyDoneWithEdsCallLocked(); + grpc_core::MutexLock lock(&ads_mu_); + NotifyDoneWithAdsCallLocked(); responses_and_delays_.clear(); } gpr_log(GPR_INFO, "LB[%p]: shut down", this); @@ -380,15 +383,15 @@ class EdsServiceImpl : public EdsService { return response; } - void NotifyDoneWithEdsCall() { - grpc_core::MutexLock lock(&eds_mu_); - NotifyDoneWithEdsCallLocked(); + void NotifyDoneWithAdsCall() { + grpc_core::MutexLock lock(&ads_mu_); + NotifyDoneWithAdsCallLocked(); } - void NotifyDoneWithEdsCallLocked() { - if (!eds_done_) { - eds_done_ = true; - eds_cond_.Broadcast(); + void NotifyDoneWithAdsCallLocked() { + if (!ads_done_) { + ads_done_ = true; + ads_cond_.Broadcast(); } } @@ -405,10 +408,10 @@ class EdsServiceImpl : public EdsService { stream->Write(response); } - grpc_core::CondVar eds_cond_; + grpc_core::CondVar ads_cond_; // Protect the members below. - grpc_core::Mutex eds_mu_; - bool eds_done_ = false; + grpc_core::Mutex ads_mu_; + bool ads_done_ = false; std::vector<ResponseDelayPair> responses_and_delays_; }; @@ -752,7 +755,7 @@ class XdsEnd2endTest : public ::testing::Test { void ScheduleResponseForBalancer(size_t i, const DiscoveryResponse& response, int delay_ms) { - balancers_[i]->eds_service()->add_response(response, delay_ms); + balancers_[i]->ads_service()->add_response(response, delay_ms); } Status SendRpc(EchoResponse* response = nullptr, int timeout_ms = 1000, @@ -870,28 +873,28 @@ class XdsEnd2endTest : public ::testing::Test { explicit BalancerServerThread(int client_load_reporting_interval = 0) : lrs_service_(client_load_reporting_interval) {} - EdsServiceImpl* eds_service() { return &eds_service_; } + AdsServiceImpl* ads_service() { return &ads_service_; } LrsServiceImpl* lrs_service() { return &lrs_service_; } private: void RegisterAllServices(ServerBuilder* builder) override { - builder->RegisterService(&eds_service_); + builder->RegisterService(&ads_service_); builder->RegisterService(&lrs_service_); } void StartAllServices() override { - eds_service_.Start(); + ads_service_.Start(); lrs_service_.Start(); } void ShutdownAllServices() override { - eds_service_.Shutdown(); + ads_service_.Shutdown(); lrs_service_.Shutdown(); } const char* Type() override { return "Balancer"; } - EdsServiceImpl eds_service_; + AdsServiceImpl ads_service_; LrsServiceImpl lrs_service_; }; @@ -945,10 +948,10 @@ TEST_F(BasicTest, Vanilla) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumRpcsPerAddress = 100; - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts()}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); // Make sure that trying to connect works without a call. channel_->GetState(true /* try_to_connect */); // We need to wait for all backends to come online. @@ -960,9 +963,9 @@ TEST_F(BasicTest, Vanilla) { EXPECT_EQ(kNumRpcsPerAddress, backends_[i]->backend_service()->request_count()); } - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); // Check LB policy name for the channel. EXPECT_EQ("xds_experimental", channel_->GetLoadBalancingPolicyName()); } @@ -974,11 +977,11 @@ TEST_F(BasicTest, SameBackendListedMultipleTimes) { SetNextResolutionForLbChannelAllBalancers(); // Same backend listed twice. std::vector<int> ports(2, backends_[0]->port()); - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", ports}, }); const size_t kNumRpcsPerAddress = 10; - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); // We need to wait for the backend to come online. WaitForBackend(0); // Send kNumRpcsPerAddress RPCs per server. @@ -998,16 +1001,16 @@ TEST_F(BasicTest, InitiallyEmptyServerlist) { const int kServerlistDelayMs = 500 * grpc_test_slowdown_factor(); const int kCallDeadlineMs = kServerlistDelayMs * 2; // First response is an empty serverlist, sent right away. - EdsServiceImpl::ResponseArgs::Locality empty_locality("locality0", {}); - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs::Locality empty_locality("locality0", {}); + AdsServiceImpl::ResponseArgs args({ empty_locality, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); // Send non-empty serverlist only after kServerlistDelayMs. - args = EdsServiceImpl::ResponseArgs({ + args = AdsServiceImpl::ResponseArgs({ {"locality0", GetBackendPorts()}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), kServerlistDelayMs); const auto t0 = system_clock::now(); // Client will block: LB will initially send empty serverlist. @@ -1020,10 +1023,10 @@ TEST_F(BasicTest, InitiallyEmptyServerlist) { // populated serverlist but under the call's deadline (which is enforced by // the call's deadline). EXPECT_GT(ellapsed_ms.count(), kServerlistDelayMs); - // The EDS service got a single request. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); + // The ADS service got a single request. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); // and sent two responses. - EXPECT_EQ(2U, balancers_[0]->eds_service()->response_count()); + EXPECT_EQ(2U, balancers_[0]->ads_service()->response_count()); } // Tests that RPCs will fail with UNAVAILABLE instead of DEADLINE_EXCEEDED if @@ -1036,16 +1039,16 @@ TEST_F(BasicTest, AllServersUnreachableFailFast) { for (size_t i = 0; i < kNumUnreachableServers; ++i) { ports.push_back(grpc_pick_unused_port_or_die()); } - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", ports}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); const Status status = SendRpc(); // The error shouldn't be DEADLINE_EXCEEDED. EXPECT_EQ(StatusCode::UNAVAILABLE, status.error_code()); - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); } // Tests that RPCs fail when the backends are down, and will succeed again after @@ -1053,10 +1056,10 @@ TEST_F(BasicTest, AllServersUnreachableFailFast) { TEST_F(BasicTest, BackendsRestart) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts()}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); WaitForAllBackends(); // Stop backends. RPCs should fail. ShutdownAllBackends(); @@ -1076,10 +1079,10 @@ TEST_F(SecureNamingTest, TargetNameIsExpected) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannel({balancers_[0]->port()}); const size_t kNumRpcsPerAddress = 100; - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts()}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); // Make sure that trying to connect works without a call. channel_->GetState(true /* try_to_connect */); // We need to wait for all backends to come online. @@ -1091,9 +1094,9 @@ TEST_F(SecureNamingTest, TargetNameIsExpected) { EXPECT_EQ(kNumRpcsPerAddress, backends_[i]->backend_service()->request_count()); } - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); } // Tests that secure naming check fails if target name is unexpected. @@ -1133,12 +1136,12 @@ TEST_F(LocalityMapTest, WeightedRoundRobin) { static_cast<double>(kLocalityWeight0) / kTotalLocalityWeight; const double kLocalityWeightRate1 = static_cast<double>(kLocalityWeight1) / kTotalLocalityWeight; - // EDS response contains 2 localities, each of which contains 1 backend. - EdsServiceImpl::ResponseArgs args({ + // ADS response contains 2 localities, each of which contains 1 backend. + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts(0, 1), kLocalityWeight0}, {"locality1", GetBackendPorts(1, 2), kLocalityWeight1}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); // Wait for both backends to be ready. WaitForAllBackends(1, 0, 2); // Send kNumRpcs RPCs. @@ -1159,9 +1162,9 @@ TEST_F(LocalityMapTest, WeightedRoundRobin) { ::testing::AllOf( ::testing::Ge(kLocalityWeightRate1 * (1 - kErrorTolerance)), ::testing::Le(kLocalityWeightRate1 * (1 + kErrorTolerance)))); - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); } // Tests that the locality map can work properly even when it contains a large @@ -1170,21 +1173,21 @@ TEST_F(LocalityMapTest, StressTest) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumLocalities = 100; - // The first EDS response contains kNumLocalities localities, each of which + // The first ADS response contains kNumLocalities localities, each of which // contains backend 0. - EdsServiceImpl::ResponseArgs args; + AdsServiceImpl::ResponseArgs args; for (size_t i = 0; i < kNumLocalities; ++i) { grpc::string name = "locality" + std::to_string(i); - EdsServiceImpl::ResponseArgs::Locality locality(name, + AdsServiceImpl::ResponseArgs::Locality locality(name, {backends_[0]->port()}); args.locality_list.emplace_back(std::move(locality)); } - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); - // The second EDS response contains 1 locality, which contains backend 1. - args = EdsServiceImpl::ResponseArgs({ + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); + // The second ADS response contains 1 locality, which contains backend 1. + args = AdsServiceImpl::ResponseArgs({ {"locality0", GetBackendPorts(1, 2)}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 60 * 1000); // Wait until backend 0 is ready, before which kNumLocalities localities are // received and handled by the xds policy. @@ -1193,10 +1196,10 @@ TEST_F(LocalityMapTest, StressTest) { // Wait until backend 1 is ready, before which kNumLocalities localities are // removed by the xds policy. WaitForBackend(1); - // The EDS service got a single request. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); + // The ADS service got a single request. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); // and sent two responses. - EXPECT_EQ(2U, balancers_[0]->eds_service()->response_count()); + EXPECT_EQ(2U, balancers_[0]->ads_service()->response_count()); } // Tests that the localities in a locality map are picked correctly after update @@ -1223,18 +1226,18 @@ TEST_F(LocalityMapTest, UpdateMap) { for (int weight : kLocalityWeights1) { locality_weight_rate_1.push_back(weight / kTotalLocalityWeight1); } - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts(0, 1), 2}, {"locality1", GetBackendPorts(1, 2), 3}, {"locality2", GetBackendPorts(2, 3), 4}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); - args = EdsServiceImpl::ResponseArgs({ + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); + args = AdsServiceImpl::ResponseArgs({ {"locality1", GetBackendPorts(1, 2), 3}, {"locality2", GetBackendPorts(2, 3), 2}, {"locality3", GetBackendPorts(3, 4), 6}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 5000); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 5000); // Wait for the first 3 backends to be ready. WaitForAllBackends(1, 0, 3); gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH =========="); @@ -1259,9 +1262,9 @@ TEST_F(LocalityMapTest, UpdateMap) { } // Backend 3 hasn't received any request. EXPECT_EQ(0U, backends_[3]->backend_service()->request_count()); - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); // Wait until the locality update has been processed, as signaled by backend 3 // receiving a request. WaitForBackend(3); @@ -1286,10 +1289,10 @@ TEST_F(LocalityMapTest, UpdateMap) { ::testing::Ge(locality_weight_rate_1[i] * (1 - kErrorTolerance)), ::testing::Le(locality_weight_rate_1[i] * (1 + kErrorTolerance)))); } - // The EDS service got a single request. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); + // The ADS service got a single request. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); // and sent two responses. - EXPECT_EQ(2U, balancers_[0]->eds_service()->response_count()); + EXPECT_EQ(2U, balancers_[0]->ads_service()->response_count()); } class FailoverTest : public BasicTest { @@ -1301,20 +1304,20 @@ class FailoverTest : public BasicTest { TEST_F(FailoverTest, ChooseHighestPriority) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts(0, 1), kDefaultLocalityWeight, 1}, {"locality1", GetBackendPorts(1, 2), kDefaultLocalityWeight, 2}, {"locality2", GetBackendPorts(2, 3), kDefaultLocalityWeight, 3}, {"locality3", GetBackendPorts(3, 4), kDefaultLocalityWeight, 0}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); WaitForBackend(3, false); for (size_t i = 0; i < 3; ++i) { EXPECT_EQ(0, backends_[i]->backend_service()->request_count()); } - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); } // If the higher priority localities are not reachable, failover to the highest @@ -1322,7 +1325,7 @@ TEST_F(FailoverTest, ChooseHighestPriority) { TEST_F(FailoverTest, Failover) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts(0, 1), kDefaultLocalityWeight, 1}, {"locality1", GetBackendPorts(1, 2), kDefaultLocalityWeight, 2}, {"locality2", GetBackendPorts(2, 3), kDefaultLocalityWeight, 3}, @@ -1330,15 +1333,15 @@ TEST_F(FailoverTest, Failover) { }); ShutdownBackend(3); ShutdownBackend(0); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); WaitForBackend(1, false); for (size_t i = 0; i < 4; ++i) { if (i == 1) continue; EXPECT_EQ(0, backends_[i]->backend_service()->request_count()); } - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); } // If a locality with higher priority than the current one becomes ready, @@ -1347,7 +1350,7 @@ TEST_F(FailoverTest, SwitchBackToHigherPriority) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumRpcs = 100; - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts(0, 1), kDefaultLocalityWeight, 1}, {"locality1", GetBackendPorts(1, 2), kDefaultLocalityWeight, 2}, {"locality2", GetBackendPorts(2, 3), kDefaultLocalityWeight, 3}, @@ -1355,7 +1358,7 @@ TEST_F(FailoverTest, SwitchBackToHigherPriority) { }); ShutdownBackend(3); ShutdownBackend(0); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); WaitForBackend(1, false); for (size_t i = 0; i < 4; ++i) { if (i == 1) continue; @@ -1365,9 +1368,9 @@ TEST_F(FailoverTest, SwitchBackToHigherPriority) { WaitForBackend(0); CheckRpcSendOk(kNumRpcs); EXPECT_EQ(kNumRpcs, backends_[0]->backend_service()->request_count()); - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); } // The first update only contains unavailable priorities. The second update @@ -1375,12 +1378,12 @@ TEST_F(FailoverTest, SwitchBackToHigherPriority) { TEST_F(FailoverTest, UpdateInitialUnavailable) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts(0, 1), kDefaultLocalityWeight, 0}, {"locality1", GetBackendPorts(1, 2), kDefaultLocalityWeight, 1}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); - args = EdsServiceImpl::ResponseArgs({ + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); + args = AdsServiceImpl::ResponseArgs({ {"locality0", GetBackendPorts(0, 1), kDefaultLocalityWeight, 0}, {"locality1", GetBackendPorts(1, 2), kDefaultLocalityWeight, 1}, {"locality2", GetBackendPorts(2, 3), kDefaultLocalityWeight, 2}, @@ -1388,7 +1391,7 @@ TEST_F(FailoverTest, UpdateInitialUnavailable) { }); ShutdownBackend(0); ShutdownBackend(1); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 1000); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 1000); gpr_timespec deadline = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_millis(500, GPR_TIMESPAN)); // Send 0.5 second worth of RPCs. @@ -1400,9 +1403,9 @@ TEST_F(FailoverTest, UpdateInitialUnavailable) { if (i == 2) continue; EXPECT_EQ(0, backends_[i]->backend_service()->request_count()); } - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(2U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(2U, balancers_[0]->ads_service()->response_count()); } // Tests that after the localities' priorities are updated, we still choose the @@ -1411,20 +1414,20 @@ TEST_F(FailoverTest, UpdatePriority) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumRpcs = 100; - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts(0, 1), kDefaultLocalityWeight, 1}, {"locality1", GetBackendPorts(1, 2), kDefaultLocalityWeight, 2}, {"locality2", GetBackendPorts(2, 3), kDefaultLocalityWeight, 3}, {"locality3", GetBackendPorts(3, 4), kDefaultLocalityWeight, 0}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); - args = EdsServiceImpl::ResponseArgs({ + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); + args = AdsServiceImpl::ResponseArgs({ {"locality0", GetBackendPorts(0, 1), kDefaultLocalityWeight, 2}, {"locality1", GetBackendPorts(1, 2), kDefaultLocalityWeight, 0}, {"locality2", GetBackendPorts(2, 3), kDefaultLocalityWeight, 1}, {"locality3", GetBackendPorts(3, 4), kDefaultLocalityWeight, 3}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 1000); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 1000); WaitForBackend(3, false); for (size_t i = 0; i < 3; ++i) { EXPECT_EQ(0, backends_[i]->backend_service()->request_count()); @@ -1432,9 +1435,9 @@ TEST_F(FailoverTest, UpdatePriority) { WaitForBackend(1); CheckRpcSendOk(kNumRpcs); EXPECT_EQ(kNumRpcs, backends_[1]->backend_service()->request_count()); - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(2U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(2U, balancers_[0]->ads_service()->response_count()); } using DropTest = BasicTest; @@ -1450,13 +1453,13 @@ TEST_F(DropTest, Vanilla) { const double kDropRateForThrottle = kDropPerMillionForThrottle / 1000000.0; const double KDropRateForLbAndThrottle = kDropRateForLb + (1 - kDropRateForLb) * kDropRateForThrottle; - // The EDS response contains two drop categories. - EdsServiceImpl::ResponseArgs args({ + // The ADS response contains two drop categories. + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts()}, }); args.drop_categories = {{kLbDropType, kDropPerMillionForLb}, {kThrottleDropType, kDropPerMillionForThrottle}}; - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); WaitForAllBackends(); // Send kNumRpcs RPCs and count the drops. size_t num_drops = 0; @@ -1480,9 +1483,9 @@ TEST_F(DropTest, Vanilla) { ::testing::AllOf( ::testing::Ge(KDropRateForLbAndThrottle * (1 - kErrorTolerance)), ::testing::Le(KDropRateForLbAndThrottle * (1 + kErrorTolerance)))); - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); } // Tests that drop config is converted correctly from per hundred. @@ -1492,13 +1495,13 @@ TEST_F(DropTest, DropPerHundred) { const size_t kNumRpcs = 5000; const uint32_t kDropPerHundredForLb = 10; const double kDropRateForLb = kDropPerHundredForLb / 100.0; - // The EDS response contains one drop category. - EdsServiceImpl::ResponseArgs args({ + // The ADS response contains one drop category. + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts()}, }); args.drop_categories = {{kLbDropType, kDropPerHundredForLb}}; args.drop_denominator = FractionalPercent::HUNDRED; - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); WaitForAllBackends(); // Send kNumRpcs RPCs and count the drops. size_t num_drops = 0; @@ -1521,9 +1524,9 @@ TEST_F(DropTest, DropPerHundred) { seen_drop_rate, ::testing::AllOf(::testing::Ge(kDropRateForLb * (1 - kErrorTolerance)), ::testing::Le(kDropRateForLb * (1 + kErrorTolerance)))); - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); } // Tests that drop config is converted correctly from per ten thousand. @@ -1533,13 +1536,13 @@ TEST_F(DropTest, DropPerTenThousand) { const size_t kNumRpcs = 5000; const uint32_t kDropPerTenThousandForLb = 1000; const double kDropRateForLb = kDropPerTenThousandForLb / 10000.0; - // The EDS response contains one drop category. - EdsServiceImpl::ResponseArgs args({ + // The ADS response contains one drop category. + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts()}, }); args.drop_categories = {{kLbDropType, kDropPerTenThousandForLb}}; args.drop_denominator = FractionalPercent::TEN_THOUSAND; - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); WaitForAllBackends(); // Send kNumRpcs RPCs and count the drops. size_t num_drops = 0; @@ -1562,9 +1565,9 @@ TEST_F(DropTest, DropPerTenThousand) { seen_drop_rate, ::testing::AllOf(::testing::Ge(kDropRateForLb * (1 - kErrorTolerance)), ::testing::Le(kDropRateForLb * (1 + kErrorTolerance)))); - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); } // Tests that drop is working correctly after update. @@ -1578,19 +1581,19 @@ TEST_F(DropTest, Update) { const double kDropRateForThrottle = kDropPerMillionForThrottle / 1000000.0; const double KDropRateForLbAndThrottle = kDropRateForLb + (1 - kDropRateForLb) * kDropRateForThrottle; - // The first EDS response contains one drop category. - EdsServiceImpl::ResponseArgs args({ + // The first ADS response contains one drop category. + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts()}, }); args.drop_categories = {{kLbDropType, kDropPerMillionForLb}}; - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); - // The second EDS response contains two drop categories. - // TODO(juanlishen): Change the EDS response sending to deterministic style + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); + // The second ADS response contains two drop categories. + // TODO(juanlishen): Change the ADS response sending to deterministic style // (e.g., by using condition variable) so that we can shorten the test // duration. args.drop_categories = {{kLbDropType, kDropPerMillionForLb}, {kThrottleDropType, kDropPerMillionForThrottle}}; - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 10000); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 10000); WaitForAllBackends(); // Send kNumRpcs RPCs and count the drops. size_t num_drops = 0; @@ -1657,10 +1660,10 @@ TEST_F(DropTest, Update) { ::testing::AllOf( ::testing::Ge(KDropRateForLbAndThrottle * (1 - kErrorTolerance)), ::testing::Le(KDropRateForLbAndThrottle * (1 + kErrorTolerance)))); - // The EDS service got a single request, - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); + // The ADS service got a single request, + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); // and sent two responses - EXPECT_EQ(2U, balancers_[0]->eds_service()->response_count()); + EXPECT_EQ(2U, balancers_[0]->ads_service()->response_count()); } // Tests that all the RPCs are dropped if any drop category drops 100%. @@ -1670,13 +1673,13 @@ TEST_F(DropTest, DropAll) { const size_t kNumRpcs = 1000; const uint32_t kDropPerMillionForLb = 100000; const uint32_t kDropPerMillionForThrottle = 1000000; - // The EDS response contains two drop categories. - EdsServiceImpl::ResponseArgs args({ + // The ADS response contains two drop categories. + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts()}, }); args.drop_categories = {{kLbDropType, kDropPerMillionForLb}, {kThrottleDropType, kDropPerMillionForThrottle}}; - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); // Send kNumRpcs RPCs and all of them are dropped. for (size_t i = 0; i < kNumRpcs; ++i) { EchoResponse response; @@ -1684,9 +1687,9 @@ TEST_F(DropTest, DropAll) { EXPECT_TRUE(!status.ok() && status.error_message() == "Call dropped by load balancing policy"); } - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); } using FallbackTest = BasicTest; @@ -1702,10 +1705,10 @@ TEST_F(FallbackTest, Vanilla) { kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); // Send non-empty serverlist only after kServerlistDelayMs. - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts(kNumBackendsInResolution)}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), kServerlistDelayMs); // Wait until all the fallback backends are reachable. WaitForAllBackends(1 /* num_requests_multiple_of */, 0 /* start_index */, @@ -1736,9 +1739,9 @@ TEST_F(FallbackTest, Vanilla) { for (size_t i = kNumBackendsInResolution; i < backends_.size(); ++i) { EXPECT_EQ(1U, backends_[i]->backend_service()->request_count()); } - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); } // Tests that RPCs are handled by the updated fallback backends before @@ -1753,11 +1756,11 @@ TEST_F(FallbackTest, Update) { kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); // Send non-empty serverlist only after kServerlistDelayMs. - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts(kNumBackendsInResolution + kNumBackendsInResolutionUpdate)}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), kServerlistDelayMs); // Wait until all the fallback backends are reachable. WaitForAllBackends(1 /* num_requests_multiple_of */, 0 /* start_index */, @@ -1818,9 +1821,9 @@ TEST_F(FallbackTest, Update) { i < backends_.size(); ++i) { EXPECT_EQ(1U, backends_[i]->backend_service()->request_count()); } - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); } // Tests that fallback will kick in immediately if the balancer channel fails. @@ -1844,7 +1847,7 @@ TEST_F(FallbackTest, FallbackEarlyWhenBalancerCallFails) { SetNextResolution({backends_[0]->port()}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); // Balancer drops call without sending a serverlist. - balancers_[0]->eds_service()->NotifyDoneWithEdsCall(); + balancers_[0]->ads_service()->NotifyDoneWithAdsCall(); // Send RPC with deadline less than the fallback timeout and make sure it // succeeds. CheckRpcSendOk(/* times */ 1, /* timeout_ms */ 1000, @@ -1860,10 +1863,10 @@ TEST_F(FallbackTest, FallbackIfResponseReceivedButChildNotReady) { SetNextResolutionForLbChannelAllBalancers(); // Send a serverlist that only contains an unreachable backend before fallback // timeout. - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", {grpc_pick_unused_port_or_die()}}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); // Because no child policy is ready before fallback timeout, we enter fallback // mode. WaitForBackend(0); @@ -1878,11 +1881,11 @@ TEST_F(FallbackTest, FallbackModeIsExitedWhenBalancerSaysToDropAllCalls) { // Enter fallback mode because the LB channel fails to connect. WaitForBackend(0); // Return a new balancer that sends a response to drop all calls. - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts()}, }); args.drop_categories = {{kLbDropType, 1000000}}; - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); SetNextResolutionForLbChannelAllBalancers(); // Send RPCs until failure. gpr_timespec deadline = gpr_time_add( @@ -1903,10 +1906,10 @@ TEST_F(FallbackTest, FallbackModeIsExitedAfterChildRready) { WaitForBackend(0); // Return a new balancer that sends a dead backend. ShutdownBackend(1); - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", {backends_[1]->port()}}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); SetNextResolutionForLbChannelAllBalancers(); // The state (TRANSIENT_FAILURE) update from the child policy will be ignored // because we are still in fallback mode. @@ -1937,14 +1940,14 @@ class BalancerUpdateTest : public XdsEnd2endTest { TEST_F(BalancerUpdateTest, UpdateBalancersButKeepUsingOriginalBalancer) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", {backends_[0]->port()}}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); - args = EdsServiceImpl::ResponseArgs({ + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); + args = AdsServiceImpl::ResponseArgs({ {"locality0", {backends_[1]->port()}}, }); - ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(1, AdsServiceImpl::BuildResponse(args), 0); // Wait until the first backend is ready. WaitForBackend(0); // Send 10 requests. @@ -1953,14 +1956,14 @@ TEST_F(BalancerUpdateTest, UpdateBalancersButKeepUsingOriginalBalancer) { gpr_log(GPR_INFO, "========= DONE WITH FIRST BATCH =========="); // All 10 requests should have gone to the first backend. EXPECT_EQ(10U, backends_[0]->backend_service()->request_count()); - // The EDS service of balancer 0 got a single request, and sent a single + // The ADS service of balancer 0 got a single request, and sent a single // response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); - EXPECT_EQ(0U, balancers_[1]->eds_service()->request_count()); - EXPECT_EQ(0U, balancers_[1]->eds_service()->response_count()); - EXPECT_EQ(0U, balancers_[2]->eds_service()->request_count()); - EXPECT_EQ(0U, balancers_[2]->eds_service()->response_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); + EXPECT_EQ(0U, balancers_[1]->ads_service()->request_count()); + EXPECT_EQ(0U, balancers_[1]->ads_service()->response_count()); + EXPECT_EQ(0U, balancers_[2]->ads_service()->request_count()); + EXPECT_EQ(0U, balancers_[2]->ads_service()->response_count()); gpr_log(GPR_INFO, "========= ABOUT TO UPDATE 1 =========="); SetNextResolutionForLbChannel({balancers_[1]->port()}); gpr_log(GPR_INFO, "========= UPDATE 1 DONE =========="); @@ -1974,12 +1977,12 @@ TEST_F(BalancerUpdateTest, UpdateBalancersButKeepUsingOriginalBalancer) { // The current LB call is still working, so xds continued using it to the // first balancer, which doesn't assign the second backend. EXPECT_EQ(0U, backends_[1]->backend_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); - EXPECT_EQ(0U, balancers_[1]->eds_service()->request_count()); - EXPECT_EQ(0U, balancers_[1]->eds_service()->response_count()); - EXPECT_EQ(0U, balancers_[2]->eds_service()->request_count()); - EXPECT_EQ(0U, balancers_[2]->eds_service()->response_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); + EXPECT_EQ(0U, balancers_[1]->ads_service()->request_count()); + EXPECT_EQ(0U, balancers_[1]->ads_service()->response_count()); + EXPECT_EQ(0U, balancers_[2]->ads_service()->request_count()); + EXPECT_EQ(0U, balancers_[2]->ads_service()->response_count()); } // Tests that the old LB call is still used after multiple balancer address @@ -1990,14 +1993,14 @@ TEST_F(BalancerUpdateTest, UpdateBalancersButKeepUsingOriginalBalancer) { TEST_F(BalancerUpdateTest, Repeated) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", {backends_[0]->port()}}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); - args = EdsServiceImpl::ResponseArgs({ + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); + args = AdsServiceImpl::ResponseArgs({ {"locality0", {backends_[1]->port()}}, }); - ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(1, AdsServiceImpl::BuildResponse(args), 0); // Wait until the first backend is ready. WaitForBackend(0); // Send 10 requests. @@ -2006,14 +2009,14 @@ TEST_F(BalancerUpdateTest, Repeated) { gpr_log(GPR_INFO, "========= DONE WITH FIRST BATCH =========="); // All 10 requests should have gone to the first backend. EXPECT_EQ(10U, backends_[0]->backend_service()->request_count()); - // The EDS service of balancer 0 got a single request, and sent a single + // The ADS service of balancer 0 got a single request, and sent a single // response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); - EXPECT_EQ(0U, balancers_[1]->eds_service()->request_count()); - EXPECT_EQ(0U, balancers_[1]->eds_service()->response_count()); - EXPECT_EQ(0U, balancers_[2]->eds_service()->request_count()); - EXPECT_EQ(0U, balancers_[2]->eds_service()->response_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); + EXPECT_EQ(0U, balancers_[1]->ads_service()->request_count()); + EXPECT_EQ(0U, balancers_[1]->ads_service()->response_count()); + EXPECT_EQ(0U, balancers_[2]->ads_service()->request_count()); + EXPECT_EQ(0U, balancers_[2]->ads_service()->response_count()); std::vector<int> ports; ports.emplace_back(balancers_[0]->port()); ports.emplace_back(balancers_[1]->port()); @@ -2055,14 +2058,14 @@ TEST_F(BalancerUpdateTest, Repeated) { TEST_F(BalancerUpdateTest, DeadUpdate) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannel({balancers_[0]->port()}); - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", {backends_[0]->port()}}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); - args = EdsServiceImpl::ResponseArgs({ + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); + args = AdsServiceImpl::ResponseArgs({ {"locality0", {backends_[1]->port()}}, }); - ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(1, AdsServiceImpl::BuildResponse(args), 0); // Start servers and send 10 RPCs per server. gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH =========="); CheckRpcSendOk(10); @@ -2080,14 +2083,14 @@ TEST_F(BalancerUpdateTest, DeadUpdate) { // All 10 requests should again have gone to the first backend. EXPECT_EQ(20U, backends_[0]->backend_service()->request_count()); EXPECT_EQ(0U, backends_[1]->backend_service()->request_count()); - // The EDS service of balancer 0 got a single request, and sent a single + // The ADS service of balancer 0 got a single request, and sent a single // response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); - EXPECT_EQ(0U, balancers_[1]->eds_service()->request_count()); - EXPECT_EQ(0U, balancers_[1]->eds_service()->response_count()); - EXPECT_EQ(0U, balancers_[2]->eds_service()->request_count()); - EXPECT_EQ(0U, balancers_[2]->eds_service()->response_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); + EXPECT_EQ(0U, balancers_[1]->ads_service()->request_count()); + EXPECT_EQ(0U, balancers_[1]->ads_service()->response_count()); + EXPECT_EQ(0U, balancers_[2]->ads_service()->request_count()); + EXPECT_EQ(0U, balancers_[2]->ads_service()->response_count()); gpr_log(GPR_INFO, "========= ABOUT TO UPDATE 1 =========="); SetNextResolutionForLbChannel({balancers_[1]->port()}); gpr_log(GPR_INFO, "========= UPDATE 1 DONE =========="); @@ -2103,18 +2106,18 @@ TEST_F(BalancerUpdateTest, DeadUpdate) { gpr_log(GPR_INFO, "========= DONE WITH THIRD BATCH =========="); // All 10 requests should have gone to the second backend. EXPECT_EQ(10U, backends_[1]->backend_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); // The second balancer, published as part of the first update, may end up // getting two requests (that is, 1 <= #req <= 2) if the LB call retry timer // firing races with the arrival of the update containing the second // balancer. - EXPECT_GE(balancers_[1]->eds_service()->request_count(), 1U); - EXPECT_GE(balancers_[1]->eds_service()->response_count(), 1U); - EXPECT_LE(balancers_[1]->eds_service()->request_count(), 2U); - EXPECT_LE(balancers_[1]->eds_service()->response_count(), 2U); - EXPECT_EQ(0U, balancers_[2]->eds_service()->request_count()); - EXPECT_EQ(0U, balancers_[2]->eds_service()->response_count()); + EXPECT_GE(balancers_[1]->ads_service()->request_count(), 1U); + EXPECT_GE(balancers_[1]->ads_service()->response_count(), 1U); + EXPECT_LE(balancers_[1]->ads_service()->request_count(), 2U); + EXPECT_LE(balancers_[1]->ads_service()->response_count(), 2U); + EXPECT_EQ(0U, balancers_[2]->ads_service()->request_count()); + EXPECT_EQ(0U, balancers_[2]->ads_service()->response_count()); } // The re-resolution tests are deferred because they rely on the fallback mode, @@ -2137,10 +2140,10 @@ TEST_F(ClientLoadReportingTest, Vanilla) { const size_t kNumRpcsPerAddress = 100; // TODO(juanlishen): Partition the backends after multiple localities is // tested. - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts()}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); // Wait until all backends are ready. int num_ok = 0; int num_failure = 0; @@ -2153,9 +2156,9 @@ TEST_F(ClientLoadReportingTest, Vanilla) { EXPECT_EQ(kNumRpcsPerAddress, backends_[i]->backend_service()->request_count()); } - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); // The LRS service got a single request, and sent a single response. EXPECT_EQ(1U, balancers_[0]->lrs_service()->request_count()); EXPECT_EQ(1U, balancers_[0]->lrs_service()->response_count()); @@ -2178,10 +2181,10 @@ TEST_F(ClientLoadReportingTest, BalancerRestart) { const size_t kNumBackendsFirstPass = backends_.size() / 2; const size_t kNumBackendsSecondPass = backends_.size() - kNumBackendsFirstPass; - EdsServiceImpl::ResponseArgs args({ + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts(0, kNumBackendsFirstPass)}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); // Wait until all backends returned by the balancer are ready. int num_ok = 0; int num_failure = 0; @@ -2208,10 +2211,10 @@ TEST_F(ClientLoadReportingTest, BalancerRestart) { } // Now restart the balancer, this time pointing to the new backends. balancers_[0]->Start(server_host_); - args = EdsServiceImpl::ResponseArgs({ + args = AdsServiceImpl::ResponseArgs({ {"locality0", GetBackendPorts(kNumBackendsFirstPass)}, }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); // Wait for queries to start going to one of the new backends. // This tells us that we're now using the new serverlist. std::tie(num_ok, num_failure, num_drops) = @@ -2245,13 +2248,13 @@ TEST_F(ClientLoadReportingWithDropTest, Vanilla) { const double kDropRateForThrottle = kDropPerMillionForThrottle / 1000000.0; const double KDropRateForLbAndThrottle = kDropRateForLb + (1 - kDropRateForLb) * kDropRateForThrottle; - // The EDS response contains two drop categories. - EdsServiceImpl::ResponseArgs args({ + // The ADS response contains two drop categories. + AdsServiceImpl::ResponseArgs args({ {"locality0", GetBackendPorts()}, }); args.drop_categories = {{kLbDropType, kDropPerMillionForLb}, {kThrottleDropType, kDropPerMillionForThrottle}}; - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0); int num_ok = 0; int num_failure = 0; int num_drops = 0; @@ -2293,9 +2296,9 @@ TEST_F(ClientLoadReportingWithDropTest, Vanilla) { kDropRateForThrottle * (1 - kErrorTolerance)), ::testing::Le(total_rpc * (1 - kDropRateForLb) * kDropRateForThrottle * (1 + kErrorTolerance)))); - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + // The ADS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count()); } } // namespace diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index 8560fa47657a12980d8b824c412448d75989cd6d..b83d13f9f3d5a68737d673bef937569db515ac79 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -65,7 +65,6 @@ CONFIG = [ # well known method names '/grpc.lb.v1.LoadBalancer/BalanceLoad', '/envoy.service.load_stats.v2.LoadReportingService/StreamLoadStats', - '/envoy.api.v2.EndpointDiscoveryService/StreamEndpoints', '/grpc.health.v1.Health/Watch', '/envoy.service.discovery.v2.AggregatedDiscoveryService/StreamAggregatedResources', # compression algorithm names