diff --git a/BUILD b/BUILD
index 612c1cfae46..4b0383ae6af 100644
--- a/BUILD
+++ b/BUILD
@@ -1757,7 +1757,6 @@ grpc_cc_library(
visibility = ["@grpc:alt_grpc_base_legacy"],
deps = [
"gpr",
- "legacy_context",
"tcp_tracer",
"//src/core:arena",
"//src/core:call_final_info",
@@ -2070,7 +2069,6 @@ grpc_cc_library(
"grpc_trace",
"iomgr",
"iomgr_timer",
- "legacy_context",
"orphanable",
"promise",
"ref_counted_ptr",
@@ -2141,19 +2139,6 @@ grpc_cc_library(
],
)
-grpc_cc_library(
- name = "legacy_context",
- hdrs = [
- "//src/core:lib/channel/context.h",
- ],
- language = "c++",
- visibility = ["@grpc:alt_grpc_base_legacy"],
- deps = [
- "gpr_platform",
- "//src/core:context",
- ],
-)
-
grpc_cc_library(
name = "lb_load_data_store",
srcs = [
@@ -2343,7 +2328,6 @@ grpc_cc_library(
"grpc_trace",
"handshaker",
"iomgr",
- "legacy_context",
"promise",
"ref_counted_ptr",
"resource_quota_api",
@@ -2524,7 +2508,6 @@ grpc_cc_library(
"grpcpp_status",
"iomgr",
"iomgr_timer",
- "legacy_context",
"ref_counted_ptr",
"resource_quota_api",
"server",
@@ -2610,7 +2593,6 @@ grpc_cc_library(
"grpcpp_status",
"iomgr",
"iomgr_timer",
- "legacy_context",
"ref_counted_ptr",
"resource_quota_api",
"server",
@@ -2936,7 +2918,6 @@ grpc_cc_library(
"grpc++_base",
"grpc_base",
"grpc_public_hdrs",
- "legacy_context",
"tcp_tracer",
"//src/core:arena",
"//src/core:arena_promise",
@@ -3763,7 +3744,6 @@ grpc_cc_library(
"grpc_trace",
"iomgr",
"lb_child_policy_handler",
- "legacy_context",
"orphanable",
"promise",
"ref_counted_ptr",
@@ -4343,7 +4323,6 @@ grpc_cc_library(
"grpc_base",
"grpc_public_hdrs",
"grpc_trace",
- "legacy_context",
"promise",
"//src/core:activity",
"//src/core:arena",
@@ -4826,7 +4805,6 @@ grpc_cc_library(
"httpcli",
"iomgr",
"iomgr_buffer_list",
- "legacy_context",
"ref_counted_ptr",
"stats",
"tcp_tracer",
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f6a7fce3b73..22540a4b7c4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1093,7 +1093,6 @@ if(gRPC_BUILD_TESTS)
endif()
add_dependencies(buildtests_cxx file_watcher_certificate_provider_factory_test)
add_dependencies(buildtests_cxx filter_causes_close_test)
- add_dependencies(buildtests_cxx filter_context_test)
add_dependencies(buildtests_cxx filter_init_fails_test)
add_dependencies(buildtests_cxx filter_test_test)
add_dependencies(buildtests_cxx filtered_metadata_test)
@@ -14034,69 +14033,6 @@ target_link_libraries(filter_causes_close_test
)
-endif()
-if(gRPC_BUILD_TESTS)
-
-add_executable(filter_context_test
- src/core/ext/transport/chaotic_good/chaotic_good_transport.cc
- src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc
- src/core/ext/transport/chaotic_good/client_transport.cc
- src/core/ext/transport/chaotic_good/frame.cc
- src/core/ext/transport/chaotic_good/frame_header.cc
- src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc
- src/core/ext/transport/chaotic_good/server_transport.cc
- src/core/ext/transport/chaotic_good/settings_metadata.cc
- src/core/lib/transport/promise_endpoint.cc
- test/core/end2end/cq_verifier.cc
- test/core/end2end/end2end_test_main.cc
- test/core/end2end/end2end_test_suites.cc
- test/core/end2end/end2end_tests.cc
- test/core/end2end/fixtures/http_proxy_fixture.cc
- test/core/end2end/fixtures/local_util.cc
- test/core/end2end/fixtures/proxy.cc
- test/core/end2end/tests/filter_context.cc
- test/core/event_engine/event_engine_test_utils.cc
- test/core/test_util/fake_stats_plugin.cc
- test/core/test_util/test_lb_policies.cc
-)
-if(WIN32 AND MSVC)
- if(BUILD_SHARED_LIBS)
- target_compile_definitions(filter_context_test
- PRIVATE
- "GPR_DLL_IMPORTS"
- "GRPC_DLL_IMPORTS"
- )
- endif()
-endif()
-target_compile_features(filter_context_test PUBLIC cxx_std_14)
-target_include_directories(filter_context_test
- PRIVATE
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/include
- ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
- ${_gRPC_RE2_INCLUDE_DIR}
- ${_gRPC_SSL_INCLUDE_DIR}
- ${_gRPC_UPB_GENERATED_DIR}
- ${_gRPC_UPB_GRPC_GENERATED_DIR}
- ${_gRPC_UPB_INCLUDE_DIR}
- ${_gRPC_XXHASH_INCLUDE_DIR}
- ${_gRPC_ZLIB_INCLUDE_DIR}
- third_party/googletest/googletest/include
- third_party/googletest/googletest
- third_party/googletest/googlemock/include
- third_party/googletest/googlemock
- ${_gRPC_PROTO_GENS_DIR}
-)
-
-target_link_libraries(filter_context_test
- ${_gRPC_ALLTARGETS_LIBRARIES}
- gtest
- grpc_authorization_provider
- grpc_unsecure
- grpc_test_util
-)
-
-
endif()
if(gRPC_BUILD_TESTS)
diff --git a/Package.swift b/Package.swift
index d9e723fc3d3..bfc9312d1fe 100644
--- a/Package.swift
+++ b/Package.swift
@@ -1107,7 +1107,6 @@ let package = Package(
"src/core/lib/channel/channel_stack_trace.h",
"src/core/lib/channel/connected_channel.cc",
"src/core/lib/channel/connected_channel.h",
- "src/core/lib/channel/context.h",
"src/core/lib/channel/promise_based_filter.cc",
"src/core/lib/channel/promise_based_filter.h",
"src/core/lib/channel/status_util.cc",
diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml
index b8f416001e3..198ee0d8fae 100644
--- a/build_autogenerated.yaml
+++ b/build_autogenerated.yaml
@@ -803,7 +803,6 @@ libs:
- src/core/lib/channel/channel_stack_builder_impl.h
- src/core/lib/channel/channel_stack_trace.h
- src/core/lib/channel/connected_channel.h
- - src/core/lib/channel/context.h
- src/core/lib/channel/promise_based_filter.h
- src/core/lib/channel/status_util.h
- src/core/lib/compression/compression_internal.h
@@ -2347,7 +2346,6 @@ libs:
- src/core/lib/channel/channel_stack_builder_impl.h
- src/core/lib/channel/channel_stack_trace.h
- src/core/lib/channel/connected_channel.h
- - src/core/lib/channel/context.h
- src/core/lib/channel/promise_based_filter.h
- src/core/lib/channel/status_util.h
- src/core/lib/compression/compression_internal.h
@@ -4440,7 +4438,6 @@ libs:
- src/core/lib/channel/channel_stack_builder_impl.h
- src/core/lib/channel/channel_stack_trace.h
- src/core/lib/channel/connected_channel.h
- - src/core/lib/channel/context.h
- src/core/lib/channel/promise_based_filter.h
- src/core/lib/channel/status_util.h
- src/core/lib/compression/compression_internal.h
@@ -9706,69 +9703,6 @@ targets:
- grpc_authorization_provider
- grpc_unsecure
- grpc_test_util
-- name: filter_context_test
- gtest: true
- build: test
- language: c++
- headers:
- - src/core/ext/transport/chaotic_good/chaotic_good_transport.h
- - src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h
- - src/core/ext/transport/chaotic_good/client_transport.h
- - src/core/ext/transport/chaotic_good/frame.h
- - src/core/ext/transport/chaotic_good/frame_header.h
- - src/core/ext/transport/chaotic_good/server/chaotic_good_server.h
- - src/core/ext/transport/chaotic_good/server_transport.h
- - src/core/ext/transport/chaotic_good/settings_metadata.h
- - src/core/lib/promise/event_engine_wakeup_scheduler.h
- - src/core/lib/promise/inter_activity_latch.h
- - src/core/lib/promise/inter_activity_pipe.h
- - src/core/lib/promise/mpsc.h
- - src/core/lib/promise/switch.h
- - src/core/lib/promise/wait_for_callback.h
- - src/core/lib/promise/wait_set.h
- - src/core/lib/transport/promise_endpoint.h
- - test/core/end2end/cq_verifier.h
- - test/core/end2end/end2end_tests.h
- - test/core/end2end/fixtures/h2_oauth2_common.h
- - test/core/end2end/fixtures/h2_ssl_cred_reload_fixture.h
- - test/core/end2end/fixtures/h2_ssl_tls_common.h
- - test/core/end2end/fixtures/h2_tls_common.h
- - test/core/end2end/fixtures/http_proxy_fixture.h
- - test/core/end2end/fixtures/inproc_fixture.h
- - test/core/end2end/fixtures/local_util.h
- - test/core/end2end/fixtures/proxy.h
- - test/core/end2end/fixtures/secure_fixture.h
- - test/core/end2end/fixtures/sockpair_fixture.h
- - test/core/end2end/tests/cancel_test_helpers.h
- - test/core/event_engine/event_engine_test_utils.h
- - test/core/test_util/fake_stats_plugin.h
- - test/core/test_util/test_lb_policies.h
- src:
- - src/core/ext/transport/chaotic_good/chaotic_good_transport.cc
- - src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc
- - src/core/ext/transport/chaotic_good/client_transport.cc
- - src/core/ext/transport/chaotic_good/frame.cc
- - src/core/ext/transport/chaotic_good/frame_header.cc
- - src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc
- - src/core/ext/transport/chaotic_good/server_transport.cc
- - src/core/ext/transport/chaotic_good/settings_metadata.cc
- - src/core/lib/transport/promise_endpoint.cc
- - test/core/end2end/cq_verifier.cc
- - test/core/end2end/end2end_test_main.cc
- - test/core/end2end/end2end_test_suites.cc
- - test/core/end2end/end2end_tests.cc
- - test/core/end2end/fixtures/http_proxy_fixture.cc
- - test/core/end2end/fixtures/local_util.cc
- - test/core/end2end/fixtures/proxy.cc
- - test/core/end2end/tests/filter_context.cc
- - test/core/event_engine/event_engine_test_utils.cc
- - test/core/test_util/fake_stats_plugin.cc
- - test/core/test_util/test_lb_policies.cc
- deps:
- - gtest
- - grpc_authorization_provider
- - grpc_unsecure
- - grpc_test_util
- name: filter_init_fails_test
gtest: true
build: test
@@ -11751,7 +11685,6 @@ targets:
- src/core/lib/channel/channel_stack_builder_impl.h
- src/core/lib/channel/channel_stack_trace.h
- src/core/lib/channel/connected_channel.h
- - src/core/lib/channel/context.h
- src/core/lib/channel/promise_based_filter.h
- src/core/lib/channel/status_util.h
- src/core/lib/compression/compression_internal.h
diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec
index b91516be325..bd16e5d387e 100644
--- a/gRPC-C++.podspec
+++ b/gRPC-C++.podspec
@@ -882,7 +882,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_builder_impl.h',
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/connected_channel.h',
- 'src/core/lib/channel/context.h',
'src/core/lib/channel/promise_based_filter.h',
'src/core/lib/channel/status_util.h',
'src/core/lib/compression/compression_internal.h',
@@ -2156,7 +2155,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_builder_impl.h',
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/connected_channel.h',
- 'src/core/lib/channel/context.h',
'src/core/lib/channel/promise_based_filter.h',
'src/core/lib/channel/status_util.h',
'src/core/lib/compression/compression_internal.h',
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index 9667c4b3873..c71dbf7fdae 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -1226,7 +1226,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/connected_channel.cc',
'src/core/lib/channel/connected_channel.h',
- 'src/core/lib/channel/context.h',
'src/core/lib/channel/promise_based_filter.cc',
'src/core/lib/channel/promise_based_filter.h',
'src/core/lib/channel/status_util.cc',
@@ -2938,7 +2937,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_builder_impl.h',
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/connected_channel.h',
- 'src/core/lib/channel/context.h',
'src/core/lib/channel/promise_based_filter.h',
'src/core/lib/channel/status_util.h',
'src/core/lib/compression/compression_internal.h',
diff --git a/grpc.gemspec b/grpc.gemspec
index 8292d7a115f..c7b08f484ba 100644
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -1113,7 +1113,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/channel/channel_stack_trace.h )
s.files += %w( src/core/lib/channel/connected_channel.cc )
s.files += %w( src/core/lib/channel/connected_channel.h )
- s.files += %w( src/core/lib/channel/context.h )
s.files += %w( src/core/lib/channel/promise_based_filter.cc )
s.files += %w( src/core/lib/channel/promise_based_filter.h )
s.files += %w( src/core/lib/channel/status_util.cc )
diff --git a/package.xml b/package.xml
index 1be34c03fb5..6c86c1b4769 100644
--- a/package.xml
+++ b/package.xml
@@ -1095,7 +1095,6 @@
-
diff --git a/src/core/BUILD b/src/core/BUILD
index da54755fd46..e23dec8b9b3 100644
--- a/src/core/BUILD
+++ b/src/core/BUILD
@@ -163,7 +163,6 @@ grpc_cc_library(
"//:config",
"//:gpr_platform",
"//:grpc_base",
- "//:legacy_context",
],
)
@@ -3196,7 +3195,6 @@ grpc_cc_library(
"unique_type_name",
"useful",
"//:gpr_platform",
- "//:legacy_context",
"//:ref_counted_ptr",
],
)
@@ -3295,7 +3293,6 @@ grpc_cc_library(
"unique_type_name",
"//:call_tracer",
"//:gpr",
- "//:legacy_context",
],
)
@@ -3515,7 +3512,6 @@ grpc_cc_library(
"//:gpr_public_hdrs",
"//:grpc_base",
"//:grpc_service_config_impl",
- "//:legacy_context",
"//:ref_counted_ptr",
],
)
@@ -3767,7 +3763,6 @@ grpc_cc_library(
"status_helper",
"//:gpr",
"//:grpc_base",
- "//:legacy_context",
"//:promise",
"//:ref_counted_ptr",
],
@@ -4775,7 +4770,6 @@ grpc_cc_library(
"//:grpc_base",
"//:grpc_public_hdrs",
"//:grpc_trace",
- "//:legacy_context",
],
)
@@ -4820,7 +4814,6 @@ grpc_cc_library(
"//:grpc_base",
"//:grpc_public_hdrs",
"//:grpc_trace",
- "//:legacy_context",
],
)
@@ -4862,7 +4855,6 @@ grpc_cc_library(
"//:gpr",
"//:grpc_base",
"//:grpc_security_base",
- "//:legacy_context",
"//:promise",
],
)
@@ -4908,7 +4900,6 @@ grpc_cc_library(
"//:gpr",
"//:grpc_base",
"//:grpc_trace",
- "//:legacy_context",
],
)
@@ -6344,7 +6335,6 @@ grpc_cc_library(
"//:gpr_platform",
"//:grpc_base",
"//:grpc_trace",
- "//:legacy_context",
"//:xds_orca_upb",
],
)
@@ -6684,7 +6674,6 @@ grpc_cc_library(
"//:grpc_resolver",
"//:grpc_service_config_impl",
"//:grpc_trace",
- "//:legacy_context",
"//:orphanable",
"//:ref_counted_ptr",
"//:uri_parser",
@@ -7297,7 +7286,6 @@ grpc_cc_library(
"//:grpc_client_channel",
"//:grpc_public_hdrs",
"//:grpc_resolver",
- "//:legacy_context",
"//:uri_parser",
],
)
@@ -7644,7 +7632,6 @@ grpc_cc_library(
"status_flag",
"try_seq",
"//:gpr",
- "//:legacy_context",
"//:promise",
],
)
@@ -7915,7 +7902,6 @@ grpc_cc_library(
"time",
"//:call_tracer",
"//:gpr",
- "//:legacy_context",
],
)
diff --git a/src/core/client_channel/client_channel.cc b/src/core/client_channel/client_channel.cc
index 75e261f34c1..2fe8524c40e 100644
--- a/src/core/client_channel/client_channel.cc
+++ b/src/core/client_channel/client_channel.cc
@@ -822,7 +822,7 @@ CallInitiator ClientChannel::CreateCall(
// Create an initiator/unstarted-handler pair.
auto call =
MakeCallPair(std::move(client_initial_metadata), event_engine_.get(),
- call_arena_allocator()->MakeArena(), nullptr);
+ call_arena_allocator()->MakeArena());
// Spawn a promise to wait for the resolver result.
// This will eventually start the call.
call.initiator.SpawnGuardedUntilCallCompletes(
diff --git a/src/core/client_channel/client_channel_filter.cc b/src/core/client_channel/client_channel_filter.cc
index cfdda558f3e..e6564a61440 100644
--- a/src/core/client_channel/client_channel_filter.cc
+++ b/src/core/client_channel/client_channel_filter.cc
@@ -159,7 +159,6 @@ class ClientChannelFilter::CallData {
virtual Arena* arena() const = 0;
virtual grpc_polling_entity* pollent() = 0;
virtual grpc_metadata_batch* send_initial_metadata() = 0;
- virtual grpc_call_context_element* call_context() const = 0;
// Helper function for CheckResolution(). Returns true if the call
// can continue (i.e., there is a valid resolution result, or there is
@@ -222,9 +221,6 @@ class ClientChannelFilter::FilterBasedCallData final
return pending_batches_[0]
->payload->send_initial_metadata.send_initial_metadata;
}
- grpc_call_context_element* call_context() const override {
- return call_context_;
- }
// Returns the index into pending_batches_ to be used for batch.
static size_t GetBatchIndex(grpc_transport_stream_op_batch* batch);
@@ -278,7 +274,6 @@ class ClientChannelFilter::FilterBasedCallData final
void* arg, grpc_error_handle error);
grpc_slice path_; // Request path.
- grpc_call_context_element* call_context_;
gpr_cycle_counter call_start_time_;
Timestamp deadline_;
@@ -365,9 +360,6 @@ class ClientChannelFilter::PromiseBasedCallData final
grpc_metadata_batch* send_initial_metadata() override {
return client_initial_metadata_.get();
}
- grpc_call_context_element* call_context() const override {
- return GetContext();
- }
void OnAddToQueueLocked() override
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ClientChannelFilter::resolution_mu_) {
@@ -530,10 +522,10 @@ class DynamicTerminationFilter::CallData final {
auto* calld = static_cast(elem->call_data);
auto* chand = static_cast(elem->channel_data);
ClientChannelFilter* client_channel = chand->chand_;
- grpc_call_element_args args = {calld->owning_call_, nullptr,
- calld->call_context_, calld->path_,
- /*start_time=*/0, calld->deadline_,
- calld->arena_, calld->call_combiner_};
+ grpc_call_element_args args = {calld->owning_call_, nullptr,
+ calld->path_,
+ /*start_time=*/0, calld->deadline_,
+ calld->arena_, calld->call_combiner_};
auto* service_config_call_data = GetServiceConfigCallData(calld->arena_);
calld->lb_call_ = client_channel->CreateLoadBalancedCall(
args, pollent, nullptr,
@@ -552,8 +544,7 @@ class DynamicTerminationFilter::CallData final {
deadline_(args.deadline),
arena_(args.arena),
owning_call_(args.call_stack),
- call_combiner_(args.call_combiner),
- call_context_(args.context) {}
+ call_combiner_(args.call_combiner) {}
~CallData() { CSliceUnref(path_); }
@@ -562,7 +553,6 @@ class DynamicTerminationFilter::CallData final {
Arena* arena_;
grpc_call_stack* owning_call_;
CallCombiner* call_combiner_;
- grpc_call_context_element* call_context_;
OrphanablePtr lb_call_;
};
@@ -2177,7 +2167,6 @@ bool ClientChannelFilter::CallData::CheckResolutionLocked(
ClientChannelFilter::FilterBasedCallData::FilterBasedCallData(
grpc_call_element* elem, const grpc_call_element_args& args)
: path_(CSliceRef(args.path)),
- call_context_(args.context),
call_start_time_(args.start_time),
deadline_(args.deadline),
arena_(args.arena),
@@ -2515,9 +2504,9 @@ void ClientChannelFilter::FilterBasedCallData::RetryCheckResolutionLocked() {
}
void ClientChannelFilter::FilterBasedCallData::CreateDynamicCall() {
- DynamicFilters::Call::Args args = {dynamic_filters(), pollent_, path_,
- call_start_time_, deadline_, arena(),
- call_context_, call_combiner()};
+ DynamicFilters::Call::Args args = {dynamic_filters(), pollent_, path_,
+ call_start_time_, deadline_, arena(),
+ call_combiner()};
grpc_error_handle error;
DynamicFilters* channel_stack = args.channel_stack.get();
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
@@ -2736,16 +2725,14 @@ void CreateCallAttemptTracer(Arena* arena, bool is_transparent_retry) {
} // namespace
ClientChannelFilter::LoadBalancedCall::LoadBalancedCall(
- ClientChannelFilter* chand, grpc_call_context_element* call_context,
- Arena* arena, absl::AnyInvocable on_commit,
- bool is_transparent_retry)
+ ClientChannelFilter* chand, Arena* arena,
+ absl::AnyInvocable on_commit, bool is_transparent_retry)
: InternallyRefCounted(
GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_lb_call_trace)
? "LoadBalancedCall"
: nullptr),
chand_(chand),
on_commit_(std::move(on_commit)),
- call_context_(call_context),
arena_(arena) {
CreateCallAttemptTracer(arena, is_transparent_retry);
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_lb_call_trace)) {
@@ -3014,7 +3001,7 @@ ClientChannelFilter::FilterBasedLoadBalancedCall::FilterBasedLoadBalancedCall(
ClientChannelFilter* chand, const grpc_call_element_args& args,
grpc_polling_entity* pollent, grpc_closure* on_call_destruction_complete,
absl::AnyInvocable on_commit, bool is_transparent_retry)
- : LoadBalancedCall(chand, args.context, args.arena, std::move(on_commit),
+ : LoadBalancedCall(chand, args.arena, std::move(on_commit),
is_transparent_retry),
owning_call_(args.call_stack),
call_combiner_(args.call_combiner),
@@ -3454,10 +3441,10 @@ void ClientChannelFilter::FilterBasedLoadBalancedCall::CreateSubchannelCall() {
CHECK_NE(path, nullptr);
SubchannelCall::Args call_args = {
connected_subchannel()->Ref(), pollent_, path->Ref(), /*start_time=*/0,
- arena()->GetContext()->deadline(), arena(),
+ arena()->GetContext()->deadline(),
// TODO(roth): When we implement hedging support, we will probably
- // need to use a separate call context for each subchannel call.
- call_context(), call_combiner_};
+ // need to use a separate arena for each subchannel call.
+ arena(), call_combiner_};
grpc_error_handle error;
subchannel_call_ = SubchannelCall::Create(std::move(call_args), &error);
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_lb_call_trace)) {
@@ -3483,8 +3470,7 @@ void ClientChannelFilter::FilterBasedLoadBalancedCall::CreateSubchannelCall() {
ClientChannelFilter::PromiseBasedLoadBalancedCall::PromiseBasedLoadBalancedCall(
ClientChannelFilter* chand, absl::AnyInvocable on_commit,
bool is_transparent_retry)
- : LoadBalancedCall(chand, GetContext(),
- GetContext(), std::move(on_commit),
+ : LoadBalancedCall(chand, GetContext(), std::move(on_commit),
is_transparent_retry) {}
ArenaPromise
diff --git a/src/core/client_channel/client_channel_filter.h b/src/core/client_channel/client_channel_filter.h
index e1c5e9aee25..602339074fd 100644
--- a/src/core/client_channel/client_channel_filter.h
+++ b/src/core/client_channel/client_channel_filter.h
@@ -46,7 +46,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
@@ -371,8 +370,7 @@ class ClientChannelFilter final {
class ClientChannelFilter::LoadBalancedCall
: public InternallyRefCounted {
public:
- LoadBalancedCall(ClientChannelFilter* chand,
- grpc_call_context_element* call_context, Arena* arena,
+ LoadBalancedCall(ClientChannelFilter* chand, Arena* arena,
absl::AnyInvocable on_commit,
bool is_transparent_retry);
~LoadBalancedCall() override;
@@ -427,8 +425,6 @@ class ClientChannelFilter::LoadBalancedCall
void RecordLatency();
- grpc_call_context_element* call_context() const { return call_context_; }
-
private:
class LbCallState;
class Metadata;
@@ -459,7 +455,6 @@ class ClientChannelFilter::LoadBalancedCall
const BackendMetricData* backend_metric_data_ = nullptr;
std::unique_ptr
lb_subchannel_call_tracker_;
- grpc_call_context_element* const call_context_;
Arena* const arena_;
};
diff --git a/src/core/client_channel/client_channel_internal.h b/src/core/client_channel/client_channel_internal.h
index ccc9dfef8c9..182da363192 100644
--- a/src/core/client_channel/client_channel_internal.h
+++ b/src/core/client_channel/client_channel_internal.h
@@ -26,7 +26,6 @@
#include
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/unique_type_name.h"
#include "src/core/lib/resource_quota/arena.h"
#include "src/core/lib/transport/call_destination.h"
diff --git a/src/core/client_channel/dynamic_filters.cc b/src/core/client_channel/dynamic_filters.cc
index c589f860807..f901cf8b9bc 100644
--- a/src/core/client_channel/dynamic_filters.cc
+++ b/src/core/client_channel/dynamic_filters.cc
@@ -59,7 +59,6 @@ DynamicFilters::Call::Call(Args args, grpc_error_handle* error)
const grpc_call_element_args call_args = {
call_stack, // call_stack
nullptr, // server_transport_data
- args.context, // context
args.path, // path
args.start_time, // start_time
args.deadline, // deadline
diff --git a/src/core/client_channel/dynamic_filters.h b/src/core/client_channel/dynamic_filters.h
index d6aa9b4cf7e..bbde6e6c806 100644
--- a/src/core/client_channel/dynamic_filters.h
+++ b/src/core/client_channel/dynamic_filters.h
@@ -27,7 +27,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
@@ -54,7 +53,6 @@ class DynamicFilters final : public RefCounted {
gpr_cycle_counter start_time;
Timestamp deadline;
Arena* arena;
- grpc_call_context_element* context;
CallCombiner* call_combiner;
};
diff --git a/src/core/client_channel/retry_filter.h b/src/core/client_channel/retry_filter.h
index dc4968bd483..731b4c3ad69 100644
--- a/src/core/client_channel/retry_filter.h
+++ b/src/core/client_channel/retry_filter.h
@@ -38,7 +38,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/error.h"
diff --git a/src/core/client_channel/retry_filter_legacy_call_data.cc b/src/core/client_channel/retry_filter_legacy_call_data.cc
index d4feda31cd4..00bbc87c70e 100644
--- a/src/core/client_channel/retry_filter_legacy_call_data.cc
+++ b/src/core/client_channel/retry_filter_legacy_call_data.cc
@@ -32,7 +32,6 @@
#include "src/core/client_channel/retry_throttle.h"
#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/status_util.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/construct_destruct.h"
@@ -120,7 +119,6 @@ RetryFilter::LegacyCallData::CallAttempt::CallAttempt(
: RefCounted(GRPC_TRACE_FLAG_ENABLED(grpc_retry_trace) ? "CallAttempt"
: nullptr),
calld_(calld),
- batch_payload_(calld->call_context_),
started_send_initial_metadata_(false),
completed_send_initial_metadata_(false),
started_send_trailing_metadata_(false),
@@ -1562,7 +1560,6 @@ RetryFilter::LegacyCallData::LegacyCallData(RetryFilter* chand,
arena_(args.arena),
owning_call_(args.call_stack),
call_combiner_(args.call_combiner),
- call_context_(args.context),
call_stack_destruction_barrier_(
arena_->New()),
pending_send_initial_metadata_(false),
@@ -1714,9 +1711,9 @@ void RetryFilter::LegacyCallData::StartTransportStreamOpBatch(
OrphanablePtr
RetryFilter::LegacyCallData::CreateLoadBalancedCall(
absl::AnyInvocable on_commit, bool is_transparent_retry) {
- grpc_call_element_args args = {owning_call_, nullptr, call_context_,
- path_, /*start_time=*/0, deadline_,
- arena_, call_combiner_};
+ grpc_call_element_args args = {owning_call_, nullptr, path_,
+ /*start_time=*/0, deadline_, arena_,
+ call_combiner_};
return chand_->client_channel()->CreateLoadBalancedCall(
args, pollent_,
// This callback holds a ref to the CallStackDestructionBarrier
diff --git a/src/core/client_channel/retry_filter_legacy_call_data.h b/src/core/client_channel/retry_filter_legacy_call_data.h
index 876bd872655..dd308b72366 100644
--- a/src/core/client_channel/retry_filter_legacy_call_data.h
+++ b/src/core/client_channel/retry_filter_legacy_call_data.h
@@ -37,7 +37,6 @@
#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted.h"
@@ -380,7 +379,6 @@ class RetryFilter::LegacyCallData final {
Arena* arena_;
grpc_call_stack* owning_call_;
CallCombiner* call_combiner_;
- grpc_call_context_element* call_context_;
grpc_error_handle cancelled_from_surface_;
diff --git a/src/core/client_channel/subchannel.cc b/src/core/client_channel/subchannel.cc
index d12f24b592a..5c7fb150fca 100644
--- a/src/core/client_channel/subchannel.cc
+++ b/src/core/client_channel/subchannel.cc
@@ -285,7 +285,6 @@ SubchannelCall::SubchannelCall(Args args, grpc_error_handle* error)
const grpc_call_element_args call_args = {
callstk, // call_stack
nullptr, // server_transport_data
- args.context, // context
args.path.c_slice(), // path
args.start_time, // start_time
args.deadline, // deadline
diff --git a/src/core/client_channel/subchannel.h b/src/core/client_channel/subchannel.h
index fc2c05ed873..cb54070a794 100644
--- a/src/core/client_channel/subchannel.h
+++ b/src/core/client_channel/subchannel.h
@@ -36,7 +36,6 @@
#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/dual_ref_counted.h"
#include "src/core/lib/gprpp/orphanable.h"
@@ -109,7 +108,6 @@ class SubchannelCall final {
gpr_cycle_counter start_time;
Timestamp deadline;
Arena* arena;
- grpc_call_context_element* context;
CallCombiner* call_combiner;
};
static RefCountedPtr Create(Args args,
diff --git a/src/core/client_channel/subchannel_stream_client.cc b/src/core/client_channel/subchannel_stream_client.cc
index 6c1fdf47093..d7f14b40cf9 100644
--- a/src/core/client_channel/subchannel_stream_client.cc
+++ b/src/core/client_channel/subchannel_stream_client.cc
@@ -172,8 +172,7 @@ SubchannelStreamClient::CallState::CallState(
grpc_pollset_set* interested_parties)
: subchannel_stream_client_(std::move(health_check_client)),
pollent_(grpc_polling_entity_create_from_pollset_set(interested_parties)),
- arena_(subchannel_stream_client_->call_allocator_->MakeArena()),
- payload_(context_) {}
+ arena_(subchannel_stream_client_->call_allocator_->MakeArena()) {}
SubchannelStreamClient::CallState::~CallState() {
if (GPR_UNLIKELY(subchannel_stream_client_->tracer_ != nullptr)) {
@@ -181,11 +180,6 @@ SubchannelStreamClient::CallState::~CallState() {
<< subchannel_stream_client_.get()
<< ": SubchannelStreamClient destroying CallState " << this;
}
- for (size_t i = 0; i < GRPC_CONTEXT_COUNT; ++i) {
- if (context_[i].destroy != nullptr) {
- context_[i].destroy(context_[i].value);
- }
- }
// Unset the call combiner cancellation closure. This has the
// effect of scheduling the previously set cancellation closure, if
// any, so that it can release any internal references it may be
@@ -206,7 +200,6 @@ void SubchannelStreamClient::CallState::StartCallLocked() {
gpr_get_cycle_counter(), // start_time
Timestamp::InfFuture(), // deadline
arena_.get(),
- context_,
&call_combiner_,
};
grpc_error_handle error;
@@ -225,7 +218,6 @@ void SubchannelStreamClient::CallState::StartCallLocked() {
return;
}
// Initialize payload and batch.
- payload_.context = context_;
batch_.payload = &payload_;
// on_complete callback takes ref, handled manually.
call_->Ref(DEBUG_LOCATION, "on_complete").release();
diff --git a/src/core/client_channel/subchannel_stream_client.h b/src/core/client_channel/subchannel_stream_client.h
index d84f4b3cc1f..3945c1c9eba 100644
--- a/src/core/client_channel/subchannel_stream_client.h
+++ b/src/core/client_channel/subchannel_stream_client.h
@@ -34,7 +34,6 @@
#include "src/core/client_channel/subchannel.h"
#include "src/core/lib/backoff/backoff.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
@@ -148,7 +147,6 @@ class SubchannelStreamClient final
RefCountedPtr arena_;
CallCombiner call_combiner_;
- grpc_call_context_element context_[GRPC_CONTEXT_COUNT] = {};
// The streaming call to the backend. Always non-null.
// Refs are tracked manually; when the last ref is released, the
diff --git a/src/core/ext/filters/backend_metrics/backend_metric_filter.cc b/src/core/ext/filters/backend_metrics/backend_metric_filter.cc
index 2664c271a22..b274dd5c5d1 100644
--- a/src/core/ext/filters/backend_metrics/backend_metric_filter.cc
+++ b/src/core/ext/filters/backend_metrics/backend_metric_filter.cc
@@ -33,7 +33,6 @@
#include
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/promise_based_filter.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/debug/trace.h"
diff --git a/src/core/ext/filters/fault_injection/fault_injection_filter.cc b/src/core/ext/filters/fault_injection/fault_injection_filter.cc
index 93ed9478ac2..71258dd8bf2 100644
--- a/src/core/ext/filters/fault_injection/fault_injection_filter.cc
+++ b/src/core/ext/filters/fault_injection/fault_injection_filter.cc
@@ -40,7 +40,6 @@
#include "src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/status_util.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/debug/trace.h"
diff --git a/src/core/ext/filters/http/message_compress/compression_filter.cc b/src/core/ext/filters/http/message_compress/compression_filter.cc
index 263371fda4f..7bb264479cd 100644
--- a/src/core/ext/filters/http/message_compress/compression_filter.cc
+++ b/src/core/ext/filters/http/message_compress/compression_filter.cc
@@ -37,7 +37,6 @@
#include "src/core/ext/filters/message_size/message_size_filter.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/promise_based_filter.h"
#include "src/core/lib/compression/compression_internal.h"
#include "src/core/lib/compression/message_compress.h"
diff --git a/src/core/ext/filters/logging/logging_filter.cc b/src/core/ext/filters/logging/logging_filter.cc
index bd229acb5de..3d95d914585 100644
--- a/src/core/ext/filters/logging/logging_filter.cc
+++ b/src/core/ext/filters/logging/logging_filter.cc
@@ -53,7 +53,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/gprpp/host_port.h"
#include "src/core/lib/gprpp/time.h"
diff --git a/src/core/ext/filters/message_size/message_size_filter.h b/src/core/ext/filters/message_size/message_size_filter.h
index e6b83900304..970604fe35a 100644
--- a/src/core/ext/filters/message_size/message_size_filter.h
+++ b/src/core/ext/filters/message_size/message_size_filter.h
@@ -30,7 +30,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/promise_based_filter.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/gprpp/validation_errors.h"
diff --git a/src/core/ext/filters/rbac/rbac_filter.cc b/src/core/ext/filters/rbac/rbac_filter.cc
index 199669b448d..a86636b10a8 100644
--- a/src/core/ext/filters/rbac/rbac_filter.cc
+++ b/src/core/ext/filters/rbac/rbac_filter.cc
@@ -29,7 +29,6 @@
#include "src/core/ext/filters/rbac/rbac_service_config_parser.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/promise/context.h"
diff --git a/src/core/ext/filters/stateful_session/stateful_session_filter.cc b/src/core/ext/filters/stateful_session/stateful_session_filter.cc
index 2648ca95249..fc8af43200e 100644
--- a/src/core/ext/filters/stateful_session/stateful_session_filter.cc
+++ b/src/core/ext/filters/stateful_session/stateful_session_filter.cc
@@ -41,7 +41,6 @@
#include "src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/crash.h"
diff --git a/src/core/ext/transport/chaotic_good/server_transport.cc b/src/core/ext/transport/chaotic_good/server_transport.cc
index bc4fbed3334..bff440234ad 100644
--- a/src/core/ext/transport/chaotic_good/server_transport.cc
+++ b/src/core/ext/transport/chaotic_good/server_transport.cc
@@ -242,7 +242,7 @@ auto ChaoticGoodServerTransport::DeserializeAndPushFragmentToNewCall(
absl::optional call_initiator;
if (status.ok()) {
auto call = MakeCallPair(std::move(fragment_frame.headers),
- event_engine_.get(), std::move(arena), nullptr);
+ event_engine_.get(), std::move(arena));
call_initiator.emplace(std::move(call.initiator));
auto add_result = NewStream(frame_header.stream_id, *call_initiator);
if (add_result.ok()) {
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
index 5de056f1b7b..6617850b24a 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
@@ -74,7 +74,6 @@
#include "src/core/ext/transport/chttp2/transport/varint.h"
#include "src/core/ext/transport/chttp2/transport/write_size_policy.h"
#include "src/core/lib/channel/channel_args.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/experiments/experiments.h"
#include "src/core/lib/gprpp/bitset.h"
#include "src/core/lib/gprpp/crash.h"
@@ -1336,7 +1335,6 @@ static void perform_stream_op_locked(void* stream_op,
grpc_transport_stream_op_batch_payload* op_payload = op->payload;
grpc_chttp2_transport* t = s->t.get();
- s->context = op->payload->context;
s->traced = op->is_traced;
s->call_tracer = CallTracerIfSampled(s);
s->tcp_tracer = TcpTracerIfSampled(s);
diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h
index ea68725210d..c258f144a9c 100644
--- a/src/core/ext/transport/chttp2/transport/internal.h
+++ b/src/core/ext/transport/chttp2/transport/internal.h
@@ -548,7 +548,6 @@ struct grpc_chttp2_stream {
const void* server_data, grpc_core::Arena* arena);
~grpc_chttp2_stream();
- void* context = nullptr;
const grpc_core::RefCountedPtr t;
grpc_stream_refcount* refcount;
grpc_core::Arena* const arena;
diff --git a/src/core/ext/transport/chttp2/transport/parsing.cc b/src/core/ext/transport/chttp2/transport/parsing.cc
index 8e81482d24d..343399919fb 100644
--- a/src/core/ext/transport/chttp2/transport/parsing.cc
+++ b/src/core/ext/transport/chttp2/transport/parsing.cc
@@ -60,7 +60,6 @@
#include "src/core/ext/transport/chttp2/transport/max_concurrent_streams_policy.h"
#include "src/core/ext/transport/chttp2/transport/ping_rate_policy.h"
#include "src/core/lib/backoff/random_early_detection.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/experiments/experiments.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc
index c5ea01739f4..a6fb7d2498d 100644
--- a/src/core/ext/transport/inproc/inproc_transport.cc
+++ b/src/core/ext/transport/inproc/inproc_transport.cc
@@ -105,9 +105,8 @@ class InprocServerTransport final : public ServerTransport {
case ConnectionState::kReady:
break;
}
- auto server_call =
- MakeCallPair(std::move(md), event_engine_.get(),
- call_arena_allocator_->MakeArena(), nullptr);
+ auto server_call = MakeCallPair(std::move(md), event_engine_.get(),
+ call_arena_allocator_->MakeArena());
unstarted_call_handler_->StartCall(std::move(server_call.handler));
return std::move(server_call.initiator);
}
diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h
index c414b33eb23..bf6dd00412b 100644
--- a/src/core/lib/channel/channel_stack.h
+++ b/src/core/lib/channel/channel_stack.h
@@ -59,7 +59,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
@@ -84,7 +83,6 @@ struct grpc_channel_element_args {
struct grpc_call_element_args {
grpc_call_stack* call_stack;
const void* server_transport_data;
- grpc_call_context_element* context;
const grpc_slice& path;
gpr_cycle_counter start_time; // Note: not populated in subchannel stack.
grpc_core::Timestamp deadline;
diff --git a/src/core/lib/channel/context.h b/src/core/lib/channel/context.h
deleted file mode 100644
index 46672c9a7ad..00000000000
--- a/src/core/lib/channel/context.h
+++ /dev/null
@@ -1,74 +0,0 @@
-//
-//
-// Copyright 2015 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.
-//
-//
-
-#ifndef GRPC_SRC_CORE_LIB_CHANNEL_CONTEXT_H
-#define GRPC_SRC_CORE_LIB_CHANNEL_CONTEXT_H
-
-#include
-
-#include "src/core/lib/promise/context.h"
-
-/// Call object context pointers.
-
-/// Call context is represented as an array of \a grpc_call_context_elements.
-/// This enum represents the indexes into the array, where each index
-/// contains a different type of value.
-typedef enum { GRPC_CONTEXT_COUNT } grpc_context_index;
-
-struct grpc_call_context_element {
- void* value = nullptr;
- void (*destroy)(void*) = nullptr;
-};
-
-namespace grpc_core {
-class ServiceConfigCallData;
-
-// Bind the legacy context array into the new style structure
-// TODO(ctiller): remove as we migrate these contexts to the new system.
-template <>
-struct ContextType {};
-
-// Also as a transition step allow exposing a GetContext that can peek into
-// the legacy context array.
-namespace promise_detail {
-template
-struct OldStyleContext;
-
-template
-class Context::kIndex)>> {
- public:
- static T* get() {
- return static_cast(
- GetContext()[OldStyleContext::kIndex]
- .value);
- }
- static void set(T* value) {
- auto& elem =
- GetContext()[OldStyleContext::kIndex];
- if (elem.destroy != nullptr) {
- elem.destroy(elem.value);
- elem.destroy = nullptr;
- }
- elem.value = value;
- }
-};
-
-} // namespace promise_detail
-} // namespace grpc_core
-
-#endif // GRPC_SRC_CORE_LIB_CHANNEL_CONTEXT_H
diff --git a/src/core/lib/channel/promise_based_filter.cc b/src/core/lib/channel/promise_based_filter.cc
index da858ee8d4f..997d4e53c4e 100644
--- a/src/core/lib/channel/promise_based_filter.cc
+++ b/src/core/lib/channel/promise_based_filter.cc
@@ -93,7 +93,6 @@ BaseCallData::BaseCallData(
call_context_(flags & kFilterExaminesCallContext
? arena_->New(nullptr)
: nullptr),
- context_(args->context),
server_initial_metadata_pipe_(
flags & kFilterExaminesServerInitialMetadata
? arena_->New>(arena_)
diff --git a/src/core/lib/channel/promise_based_filter.h b/src/core/lib/channel/promise_based_filter.h
index 5379bb6f66a..a5325c32479 100644
--- a/src/core/lib/channel/promise_based_filter.h
+++ b/src/core/lib/channel/promise_based_filter.h
@@ -46,7 +46,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/event_engine/default_event_engine.h"
#include "src/core/lib/event_engine/event_engine_context.h" // IWYU pragma: keep
#include "src/core/lib/gprpp/debug_location.h"
@@ -355,49 +354,38 @@ template
auto MapResult(absl::Status (Derived::Call::*fn)(ServerMetadata&), Promise x,
FilterCallData* call_data) {
DCHECK(fn == &Derived::Call::OnServerTrailingMetadata);
- return OnCancel(
- Map(std::move(x),
- [call_data](ServerMetadataHandle md) {
- auto status = call_data->call.OnServerTrailingMetadata(*md);
- if (!status.ok()) {
- return ServerMetadataFromStatus(status);
- }
- return md;
- }),
- // TODO(yashykt/ctiller): GetContext is not
- // valid for the cancellation function requiring us to capture it here.
- // This ought to be easy to fix once client side promises are completely
- // rolled out.
- [call_data, ctx = GetContext()]() {
- grpc_metadata_batch b;
- b.Set(GrpcStatusMetadata(), GRPC_STATUS_CANCELLED);
- b.Set(GrpcCallWasCancelled(), true);
- promise_detail::Context context(ctx);
- call_data->call.OnServerTrailingMetadata(b).IgnoreError();
- });
+ return OnCancel(Map(std::move(x),
+ [call_data](ServerMetadataHandle md) {
+ auto status =
+ call_data->call.OnServerTrailingMetadata(*md);
+ if (!status.ok()) {
+ return ServerMetadataFromStatus(status);
+ }
+ return md;
+ }),
+ [call_data]() {
+ grpc_metadata_batch b;
+ b.Set(GrpcStatusMetadata(), GRPC_STATUS_CANCELLED);
+ b.Set(GrpcCallWasCancelled(), true);
+ call_data->call.OnServerTrailingMetadata(b).IgnoreError();
+ });
}
template
auto MapResult(void (Derived::Call::*fn)(ServerMetadata&), Promise x,
FilterCallData* call_data) {
DCHECK(fn == &Derived::Call::OnServerTrailingMetadata);
- return OnCancel(
- Map(std::move(x),
- [call_data](ServerMetadataHandle md) {
- call_data->call.OnServerTrailingMetadata(*md);
- return md;
- }),
- // TODO(yashykt/ctiller): GetContext is not
- // valid for the cancellation function requiring us to capture it here.
- // This ought to be easy to fix once client side promises are completely
- // rolled out.
- [call_data, ctx = GetContext()]() {
- grpc_metadata_batch b;
- b.Set(GrpcStatusMetadata(), GRPC_STATUS_CANCELLED);
- b.Set(GrpcCallWasCancelled(), true);
- promise_detail::Context context(ctx);
- call_data->call.OnServerTrailingMetadata(b);
- });
+ return OnCancel(Map(std::move(x),
+ [call_data](ServerMetadataHandle md) {
+ call_data->call.OnServerTrailingMetadata(*md);
+ return md;
+ }),
+ [call_data]() {
+ grpc_metadata_batch b;
+ b.Set(GrpcStatusMetadata(), GRPC_STATUS_CANCELLED);
+ b.Set(GrpcCallWasCancelled(), true);
+ call_data->call.OnServerTrailingMetadata(b);
+ });
}
template
@@ -410,15 +398,10 @@ auto MapResult(void (Derived::Call::*fn)(ServerMetadata&, Derived*), Promise x,
call_data->call.OnServerTrailingMetadata(*md, call_data->channel);
return md;
}),
- // TODO(yashykt/ctiller): GetContext is not
- // valid for the cancellation function requiring us to capture it here.
- // This ought to be easy to fix once client side promises are completely
- // rolled out.
- [call_data, ctx = GetContext()]() {
+ [call_data]() {
grpc_metadata_batch b;
b.Set(GrpcStatusMetadata(), GRPC_STATUS_CANCELLED);
b.Set(GrpcCallWasCancelled(), true);
- promise_detail::Context context(ctx);
call_data->call.OnServerTrailingMetadata(b, call_data->channel);
});
}
@@ -1362,19 +1345,15 @@ class BaseCallData : public Activity, private Wakeable {
virtual void StartBatch(grpc_transport_stream_op_batch* batch) = 0;
protected:
- class ScopedContext
- : public promise_detail::Context,
- public promise_detail::Context,
- public promise_detail::Context,
- public promise_detail::Context,
- public promise_detail::Context<
- grpc_event_engine::experimental::EventEngine>,
- public promise_detail::Context {
+ class ScopedContext : public promise_detail::Context,
+ public promise_detail::Context,
+ public promise_detail::Context,
+ public promise_detail::Context<
+ grpc_event_engine::experimental::EventEngine>,
+ public promise_detail::Context {
public:
explicit ScopedContext(BaseCallData* call_data)
: promise_detail::Context(call_data->arena_),
- promise_detail::Context(
- call_data->context_),
promise_detail::Context(
call_data->pollent_.load(std::memory_order_acquire)),
promise_detail::Context(&call_data->finalization_),
@@ -1727,7 +1706,6 @@ class BaseCallData : public Activity, private Wakeable {
const Timestamp deadline_;
CallFinalization finalization_;
CallContext* call_context_ = nullptr;
- grpc_call_context_element* const context_;
std::atomic pollent_{nullptr};
Pipe* const server_initial_metadata_pipe_;
SendMessage* const send_message_;
diff --git a/src/core/lib/security/context/security_context.cc b/src/core/lib/security/context/security_context.cc
index 13ccb6f48b7..bbbd8365207 100644
--- a/src/core/lib/security/context/security_context.cc
+++ b/src/core/lib/security/context/security_context.cc
@@ -33,7 +33,6 @@
#include
#include "src/core/lib/channel/channel_args.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/resource_quota/arena.h"
diff --git a/src/core/lib/security/transport/client_auth_filter.cc b/src/core/lib/security/transport/client_auth_filter.cc
index be6fcdae3d8..a3d25294e96 100644
--- a/src/core/lib/security/transport/client_auth_filter.cc
+++ b/src/core/lib/security/transport/client_auth_filter.cc
@@ -36,7 +36,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/promise_based_filter.h"
#include "src/core/lib/channel/status_util.h"
#include "src/core/lib/gprpp/debug_location.h"
diff --git a/src/core/lib/security/transport/server_auth_filter.cc b/src/core/lib/security/transport/server_auth_filter.cc
index bf7aa2560c2..9f1f19ebf91 100644
--- a/src/core/lib/security/transport/server_auth_filter.cc
+++ b/src/core/lib/security/transport/server_auth_filter.cc
@@ -38,7 +38,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/promise_based_filter.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/debug_location.h"
diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc
index 00f424bf0af..8d76a32460c 100644
--- a/src/core/lib/surface/call.cc
+++ b/src/core/lib/surface/call.cc
@@ -59,7 +59,6 @@
#include "src/core/channelz/channelz.h"
#include "src/core/lib/channel/call_finalization.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/status_util.h"
#include "src/core/lib/compression/compression_internal.h"
#include "src/core/lib/experiments/experiments.h"
@@ -436,11 +435,6 @@ class ChannelBasedCall : public Call {
class FilterStackCall final : public ChannelBasedCall {
public:
~FilterStackCall() override {
- for (int i = 0; i < GRPC_CONTEXT_COUNT; ++i) {
- if (context_[i].destroy) {
- context_[i].destroy(context_[i].value);
- }
- }
gpr_free(static_cast(const_cast(final_info_.error_string)));
}
@@ -481,12 +475,6 @@ class FilterStackCall final : public ChannelBasedCall {
GRPC_CALL_STACK_UNREF(call_stack(), reason);
}
- void ContextSet(grpc_context_index elem, void* value,
- void (*destroy)(void* value)) override;
- void* ContextGet(grpc_context_index elem) const override {
- return context_[elem].value;
- }
-
bool is_trailers_only() const override {
bool result = is_trailers_only_;
DCHECK(!result || recv_initial_metadata_.TransportSize() == 0);
@@ -600,8 +588,7 @@ class FilterStackCall final : public ChannelBasedCall {
: ChannelBasedCall(std::move(arena),
args.server_transport_data == nullptr,
args.send_deadline, args.channel->Ref()),
- cq_(args.cq),
- stream_op_payload_(context_) {
+ cq_(args.cq) {
GetArena()->SetContext(this);
}
@@ -660,9 +647,6 @@ class FilterStackCall final : public ChannelBasedCall {
// completed
grpc_call_final_info final_info_;
- // Contexts for various subsystems (security, tracing, ...).
- grpc_call_context_element context_[GRPC_CONTEXT_COUNT] = {};
-
SliceBuffer send_slice_buffer_;
absl::optional receiving_slice_buffer_;
uint32_t receiving_stream_flags_;
@@ -792,10 +776,9 @@ grpc_error_handle FilterStackCall::Create(grpc_call_create_args* args,
}
// initial refcount dropped by grpc_call_unref
grpc_call_element_args call_args = {
- call->call_stack(), args->server_transport_data,
- call->context_, path,
- call->start_time(), call->send_deadline(),
- call->arena(), &call->call_combiner_};
+ call->call_stack(), args->server_transport_data, path,
+ call->start_time(), call->send_deadline(), call->arena(),
+ &call->call_combiner_};
add_init_error(&error, grpc_call_stack_init(channel_stack, 1, DestroyCall,
call, &call_args));
// Publish this call to parent only after the call stack has been initialized.
@@ -1860,15 +1843,6 @@ done_with_error:
goto done;
}
-void FilterStackCall::ContextSet(grpc_context_index elem, void* value,
- void (*destroy)(void*)) {
- if (context_[elem].destroy) {
- context_[elem].destroy(context_[elem].value);
- }
- context_[elem].value = value;
- context_[elem].destroy = destroy;
-}
-
///////////////////////////////////////////////////////////////////////////////
// Metadata validation helpers
@@ -1922,11 +1896,6 @@ class BasicPromiseBasedCall : public ChannelBasedCall, public Party {
~BasicPromiseBasedCall() override {
if (cq_) GRPC_CQ_INTERNAL_UNREF(cq_, "bind");
- for (int i = 0; i < GRPC_CONTEXT_COUNT; i++) {
- if (context_[i].destroy) {
- context_[i].destroy(context_[i].value);
- }
- }
}
virtual void OrphanCall() = 0;
@@ -1972,19 +1941,6 @@ class BasicPromiseBasedCall : public ChannelBasedCall, public Party {
[](Empty) {});
}
- void ContextSet(grpc_context_index elem, void* value,
- void (*destroy)(void*)) final {
- if (context_[elem].destroy != nullptr) {
- context_[elem].destroy(context_[elem].value);
- }
- context_[elem].value = value;
- context_[elem].destroy = destroy;
- }
-
- void* ContextGet(grpc_context_index elem) const final {
- return context_[elem].value;
- }
-
// Accept the stats from the context (call once we have proof the transport is
// done with them).
void AcceptTransportStatsFromContext() {
@@ -2000,23 +1956,18 @@ class BasicPromiseBasedCall : public ChannelBasedCall, public Party {
}
protected:
- class ScopedContext
- : public ScopedActivity,
- public promise_detail::Context,
- public promise_detail::Context,
- public promise_detail::Context,
- public promise_detail::Context {
+ class ScopedContext : public ScopedActivity,
+ public promise_detail::Context,
+ public promise_detail::Context,
+ public promise_detail::Context {
public:
explicit ScopedContext(BasicPromiseBasedCall* call)
: ScopedActivity(call),
promise_detail::Context(call->arena()),
- promise_detail::Context(call->context_),
promise_detail::Context(&call->call_context_),
promise_detail::Context(&call->finalization_) {}
};
- grpc_call_context_element* context() { return context_; }
-
grpc_completion_queue* cq() { return cq_; }
// At the end of the call run any finalization actions.
@@ -2057,8 +2008,6 @@ class BasicPromiseBasedCall : public ChannelBasedCall, public Party {
std::atomic external_refs_;
CallFinalization finalization_;
CallContext call_context_{this};
- // Contexts for various subsystems (security, tracing, ...).
- grpc_call_context_element context_[GRPC_CONTEXT_COUNT] = {};
grpc_call_stats final_stats_{};
Slice final_message_;
grpc_status_code final_status_ = GRPC_STATUS_UNKNOWN;
@@ -2341,7 +2290,7 @@ class PromiseBasedCall : public BasicPromiseBasedCall {
// Waiter for when sends_queued_ becomes 0.
IntraActivityWaiter waiting_for_queued_sends_;
grpc_byte_buffer** recv_message_ = nullptr;
- grpc_transport_stream_op_batch_payload batch_payload_{context()};
+ grpc_transport_stream_op_batch_payload batch_payload_{};
};
template
@@ -3212,16 +3161,6 @@ class ServerCall final : public Call, public DualRefCounted {
CancelWithError(absl::CancelledError());
}
- void ContextSet(grpc_context_index elem, void* value,
- void (*destroy)(void*)) override {
- call_handler_.legacy_context()[elem] =
- grpc_call_context_element{value, destroy};
- }
-
- void* ContextGet(grpc_context_index elem) const override {
- return call_handler_.legacy_context()[elem].value;
- }
-
void SetCompletionQueue(grpc_completion_queue*) override {
Crash("unimplemented");
}
@@ -3750,15 +3689,6 @@ grpc_call_error grpc_call_start_batch_and_execute(grpc_call* call,
return grpc_core::Call::FromC(call)->StartBatch(ops, nops, closure, true);
}
-void grpc_call_context_set(grpc_call* call, grpc_context_index elem,
- void* value, void (*destroy)(void* value)) {
- return grpc_core::Call::FromC(call)->ContextSet(elem, value, destroy);
-}
-
-void* grpc_call_context_get(grpc_call* call, grpc_context_index elem) {
- return grpc_core::Call::FromC(call)->ContextGet(elem);
-}
-
void grpc_call_tracer_set(grpc_call* call,
grpc_core::ClientCallTracer* tracer) {
grpc_core::Arena* arena = grpc_call_get_arena(call);
diff --git a/src/core/lib/surface/call.h b/src/core/lib/surface/call.h
index 12c214c68f1..038235841cd 100644
--- a/src/core/lib/surface/call.h
+++ b/src/core/lib/surface/call.h
@@ -36,7 +36,6 @@
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"
@@ -90,9 +89,6 @@ class Call : public CppImplOf,
virtual Arena* arena() = 0;
bool is_client() const { return is_client_; }
- virtual void ContextSet(grpc_context_index elem, void* value,
- void (*destroy)(void* value)) = 0;
- virtual void* ContextGet(grpc_context_index elem) const = 0;
virtual bool Completed() = 0;
void CancelWithStatus(grpc_status_code status, const char* description);
virtual void CancelWithError(grpc_error_handle error) = 0;
@@ -340,14 +336,6 @@ grpc_call* grpc_call_from_top_element(grpc_call_element* surface_element);
void grpc_call_log_batch(const char* file, int line, gpr_log_severity severity,
const grpc_op* ops, size_t nops);
-// Set a context pointer.
-// No thread safety guarantees are made wrt this value.
-// TODO(#9731): add exec_ctx to destroy
-void grpc_call_context_set(grpc_call* call, grpc_context_index elem,
- void* value, void (*destroy)(void* value));
-// Get a context pointer.
-void* grpc_call_context_get(grpc_call* call, grpc_context_index elem);
-
void grpc_call_tracer_set(grpc_call* call, grpc_core::ClientCallTracer* tracer);
void* grpc_call_tracer_get(grpc_call* call);
diff --git a/src/core/lib/transport/batch_builder.cc b/src/core/lib/transport/batch_builder.cc
index a16f5a164df..85dadf55d85 100644
--- a/src/core/lib/transport/batch_builder.cc
+++ b/src/core/lib/transport/batch_builder.cc
@@ -154,8 +154,7 @@ ServerMetadataHandle BatchBuilder::CompleteSendServerTrailingMetadata(
BatchBuilder::Batch* BatchBuilder::MakeCancel(
grpc_stream_refcount* stream_refcount, absl::Status status) {
auto* arena = GetContext();
- auto* payload =
- arena->NewPooled(nullptr);
+ auto* payload = arena->NewPooled();
auto* batch = arena->NewPooled(payload, stream_refcount);
batch->batch.cancel_stream = true;
payload->cancel_stream.cancel_error = std::move(status);
diff --git a/src/core/lib/transport/call_spine.cc b/src/core/lib/transport/call_spine.cc
index 99270ae09d1..a73329b0d1a 100644
--- a/src/core/lib/transport/call_spine.cc
+++ b/src/core/lib/transport/call_spine.cc
@@ -95,11 +95,10 @@ void ForwardCall(CallHandler call_handler, CallInitiator call_initiator) {
CallInitiatorAndHandler MakeCallPair(
ClientMetadataHandle client_initial_metadata,
grpc_event_engine::experimental::EventEngine* event_engine,
- RefCountedPtr arena, grpc_call_context_element* legacy_context) {
+ RefCountedPtr arena) {
CHECK_NE(arena.get(), nullptr);
- auto spine =
- CallSpine::Create(std::move(client_initial_metadata), event_engine,
- std::move(arena), legacy_context);
+ auto spine = CallSpine::Create(std::move(client_initial_metadata),
+ event_engine, std::move(arena));
return {CallInitiator(spine), UnstartedCallHandler(spine)};
}
diff --git a/src/core/lib/transport/call_spine.h b/src/core/lib/transport/call_spine.h
index 1dbc939d915..327fc5da6ae 100644
--- a/src/core/lib/transport/call_spine.h
+++ b/src/core/lib/transport/call_spine.h
@@ -20,7 +20,6 @@
#include
#include
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/dual_ref_counted.h"
#include "src/core/lib/promise/detail/status.h"
#include "src/core/lib/promise/if.h"
@@ -281,21 +280,13 @@ class CallSpine final : public CallSpineInterface, public Party {
static RefCountedPtr Create(
ClientMetadataHandle client_initial_metadata,
grpc_event_engine::experimental::EventEngine* event_engine,
- RefCountedPtr arena, grpc_call_context_element* legacy_context) {
+ RefCountedPtr arena) {
auto* arena_ptr = arena.get();
return RefCountedPtr(arena_ptr->New(
- std::move(client_initial_metadata), event_engine, std::move(arena),
- legacy_context));
+ std::move(client_initial_metadata), event_engine, std::move(arena)));
}
- ~CallSpine() override {
- if (legacy_context_is_owned_) {
- for (size_t i = 0; i < GRPC_CONTEXT_COUNT; i++) {
- grpc_call_context_element& elem = legacy_context_[i];
- if (elem.destroy != nullptr) elem.destroy(elem.value);
- }
- }
- }
+ ~CallSpine() override {}
CallFilters& call_filters() { return call_filters_; }
@@ -365,13 +356,6 @@ class CallSpine final : public CallSpineInterface, public Party {
return *call_filters().unprocessed_client_initial_metadata();
}
- // TODO(ctiller): re-evaluate legacy context apis
- grpc_call_context_element& legacy_context(grpc_context_index index) const {
- return legacy_context_[index];
- }
-
- grpc_call_context_element* legacy_context() { return legacy_context_; }
-
grpc_event_engine::experimental::EventEngine* event_engine() const override {
return event_engine_;
}
@@ -385,37 +369,22 @@ class CallSpine final : public CallSpineInterface, public Party {
friend class Arena;
CallSpine(ClientMetadataHandle client_initial_metadata,
grpc_event_engine::experimental::EventEngine* event_engine,
- RefCountedPtr arena,
- grpc_call_context_element* legacy_context)
+ RefCountedPtr arena)
: Party(1),
arena_(std::move(arena)),
call_filters_(std::move(client_initial_metadata)),
- event_engine_(event_engine) {
- if (legacy_context == nullptr) {
- legacy_context_ = static_cast(arena_->Alloc(
- sizeof(grpc_call_context_element) * GRPC_CONTEXT_COUNT));
- memset(legacy_context_, 0,
- sizeof(grpc_call_context_element) * GRPC_CONTEXT_COUNT);
- legacy_context_is_owned_ = true;
- } else {
- legacy_context_ = legacy_context;
- legacy_context_is_owned_ = false;
- }
- }
+ event_engine_(event_engine) {}
- class ScopedContext
- : public ScopedActivity,
- public promise_detail::Context,
- public promise_detail::Context<
- grpc_event_engine::experimental::EventEngine>,
- public promise_detail::Context {
+ class ScopedContext : public ScopedActivity,
+ public promise_detail::Context,
+ public promise_detail::Context<
+ grpc_event_engine::experimental::EventEngine> {
public:
explicit ScopedContext(CallSpine* spine)
: ScopedActivity(spine),
Context(spine->arena_.get()),
Context(
- spine->event_engine()),
- Context(spine->legacy_context_) {}
+ spine->event_engine()) {}
};
bool RunParty() override {
@@ -438,10 +407,6 @@ class CallSpine final : public CallSpineInterface, public Party {
CallFilters call_filters_;
// Event engine associated with this call
grpc_event_engine::experimental::EventEngine* const event_engine_;
- // Legacy context
- // TODO(ctiller): remove
- grpc_call_context_element* legacy_context_;
- bool legacy_context_is_owned_;
};
class CallInitiator {
@@ -565,15 +530,6 @@ class CallHandler {
return DownCast(spine_.get())->event_engine();
}
- // TODO(ctiller): re-evaluate this API
- const grpc_call_context_element* legacy_context() const {
- return DownCast(spine_.get())->legacy_context();
- }
-
- grpc_call_context_element* legacy_context() {
- return DownCast(spine_.get())->legacy_context();
- }
-
private:
RefCountedPtr spine_;
};
@@ -646,7 +602,7 @@ struct CallInitiatorAndHandler {
CallInitiatorAndHandler MakeCallPair(
ClientMetadataHandle client_initial_metadata,
grpc_event_engine::experimental::EventEngine* event_engine,
- RefCountedPtr arena, grpc_call_context_element* legacy_context);
+ RefCountedPtr arena);
template
auto OutgoingMessages(CallHalf h) {
diff --git a/src/core/lib/transport/interception_chain.cc b/src/core/lib/transport/interception_chain.cc
index 667077af586..243d82d10e7 100644
--- a/src/core/lib/transport/interception_chain.cc
+++ b/src/core/lib/transport/interception_chain.cc
@@ -40,8 +40,7 @@ CallInitiator HijackedCall::MakeCall() {
CallInitiator HijackedCall::MakeCallWithMetadata(
ClientMetadataHandle metadata) {
auto call = MakeCallPair(std::move(metadata), call_handler_.event_engine(),
- call_handler_.arena()->Ref(),
- call_handler_.legacy_context());
+ call_handler_.arena()->Ref());
destination_->StartCall(std::move(call.handler));
return std::move(call.initiator);
}
diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc
index 0ea7ad6284e..883931182d8 100644
--- a/src/core/lib/transport/transport.cc
+++ b/src/core/lib/transport/transport.cc
@@ -192,7 +192,7 @@ struct made_transport_stream_op {
grpc_closure outer_on_complete;
grpc_closure* inner_on_complete = nullptr;
grpc_transport_stream_op_batch op;
- grpc_transport_stream_op_batch_payload payload{nullptr};
+ grpc_transport_stream_op_batch_payload payload;
};
static void destroy_made_transport_stream_op(void* arg,
grpc_error_handle error) {
diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h
index 7d879a91de5..7acee54793b 100644
--- a/src/core/lib/transport/transport.h
+++ b/src/core/lib/transport/transport.h
@@ -39,7 +39,6 @@
#include
#include
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted.h"
@@ -319,9 +318,6 @@ struct grpc_transport_stream_op_batch {
};
struct grpc_transport_stream_op_batch_payload {
- explicit grpc_transport_stream_op_batch_payload(
- grpc_call_context_element* context)
- : context(context) {}
struct {
grpc_metadata_batch* send_initial_metadata = nullptr;
} send_initial_metadata;
@@ -411,9 +407,6 @@ struct grpc_transport_stream_op_batch_payload {
// initial metadata.
bool tarpit = false;
} cancel_stream;
-
- // Indexes correspond to grpc_context_index enum values
- grpc_call_context_element* context;
};
/// Transport op: a set of operations to perform on a transport as a whole
diff --git a/src/core/resolver/xds/xds_resolver.cc b/src/core/resolver/xds/xds_resolver.cc
index c61d219a8d0..0d5d631838c 100644
--- a/src/core/resolver/xds/xds_resolver.cc
+++ b/src/core/resolver/xds/xds_resolver.cc
@@ -53,7 +53,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/promise_based_filter.h"
#include "src/core/lib/channel/status_util.h"
#include "src/core/lib/config/core_configuration.h"
diff --git a/src/core/server/server_call_tracer_filter.cc b/src/core/server/server_call_tracer_filter.cc
index efe05fc1f0c..f6a02adefd5 100644
--- a/src/core/server/server_call_tracer_filter.cc
+++ b/src/core/server/server_call_tracer_filter.cc
@@ -29,7 +29,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/promise_based_filter.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/promise/arena_promise.h"
diff --git a/src/core/server/server_config_selector_filter.cc b/src/core/server/server_config_selector_filter.cc
index 7fc886544ed..d04b10a0d86 100644
--- a/src/core/server/server_config_selector_filter.cc
+++ b/src/core/server/server_config_selector_filter.cc
@@ -28,7 +28,6 @@
#include
#include "src/core/lib/channel/channel_args.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/promise_based_filter.h"
#include "src/core/lib/event_engine/event_engine_context.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
diff --git a/src/core/service_config/service_config_call_data.h b/src/core/service_config/service_config_call_data.h
index 73e9f33f19e..00e5d5b56b2 100644
--- a/src/core/service_config/service_config_call_data.h
+++ b/src/core/service_config/service_config_call_data.h
@@ -24,7 +24,6 @@
#include
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/chunked_vector.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/unique_type_name.h"
diff --git a/src/core/service_config/service_config_channel_arg_filter.cc b/src/core/service_config/service_config_channel_arg_filter.cc
index 7470fd5db2c..8b06f26ebcf 100644
--- a/src/core/service_config/service_config_channel_arg_filter.cc
+++ b/src/core/service_config/service_config_channel_arg_filter.cc
@@ -35,7 +35,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/promise_based_filter.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
diff --git a/src/core/telemetry/call_tracer.h b/src/core/telemetry/call_tracer.h
index 1053777d85d..3f8e25d75b5 100644
--- a/src/core/telemetry/call_tracer.h
+++ b/src/core/telemetry/call_tracer.h
@@ -30,7 +30,6 @@
#include
#include "src/core/lib/channel/channel_args.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/ref_counted_string.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/promise/context.h"
diff --git a/src/core/telemetry/metrics.h b/src/core/telemetry/metrics.h
index 8551b74bc62..55827c81a01 100644
--- a/src/core/telemetry/metrics.h
+++ b/src/core/telemetry/metrics.h
@@ -30,7 +30,6 @@
#include
#include "src/core/lib/channel/channel_args.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/no_destruct.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/gprpp/time.h"
diff --git a/src/cpp/ext/filters/census/client_filter.cc b/src/cpp/ext/filters/census/client_filter.cc
index 52465fdaf30..9ef8bf5a557 100644
--- a/src/cpp/ext/filters/census/client_filter.cc
+++ b/src/cpp/ext/filters/census/client_filter.cc
@@ -53,7 +53,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/promise/context.h"
#include "src/core/lib/resource_quota/arena.h"
@@ -102,7 +101,6 @@ OpenCensusClientFilter::MakeCallPromise(
grpc_core::HttpPathMetadata());
auto* arena = grpc_core::GetContext();
auto* tracer = arena->ManagedNew(
- grpc_core::GetContext(),
path != nullptr ? path->Ref() : grpc_core::Slice(),
grpc_core::GetContext(),
OpenCensusTracingEnabled() && tracing_enabled_);
@@ -304,11 +302,10 @@ OpenCensusCallTracer::OpenCensusCallAttemptTracer::StartNewTcpTrace() {
// OpenCensusCallTracer
//
-OpenCensusCallTracer::OpenCensusCallTracer(
- grpc_call_context_element* call_context, grpc_core::Slice path,
- grpc_core::Arena* arena, bool tracing_enabled)
- : call_context_(call_context),
- path_(std::move(path)),
+OpenCensusCallTracer::OpenCensusCallTracer(grpc_core::Slice path,
+ grpc_core::Arena* arena,
+ bool tracing_enabled)
+ : path_(std::move(path)),
method_(GetMethod(path_)),
arena_(arena),
tracing_enabled_(tracing_enabled) {
diff --git a/src/cpp/ext/filters/census/open_census_call_tracer.h b/src/cpp/ext/filters/census/open_census_call_tracer.h
index 690677b5d94..221a551a8c3 100644
--- a/src/cpp/ext/filters/census/open_census_call_tracer.h
+++ b/src/cpp/ext/filters/census/open_census_call_tracer.h
@@ -37,7 +37,6 @@
#include
#include
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/resource_quota/arena.h"
@@ -124,8 +123,7 @@ class OpenCensusCallTracer : public grpc_core::ClientCallTracer {
absl::StatusCode status_code_;
};
- explicit OpenCensusCallTracer(grpc_call_context_element* call_context,
- grpc_core::Slice path, grpc_core::Arena* arena,
+ explicit OpenCensusCallTracer(grpc_core::Slice path, grpc_core::Arena* arena,
bool tracing_enabled);
~OpenCensusCallTracer() override;
@@ -150,7 +148,6 @@ class OpenCensusCallTracer : public grpc_core::ClientCallTracer {
private:
experimental::CensusContext CreateCensusContextForCallAttempt();
- const grpc_call_context_element* call_context_;
// Client method.
grpc_core::Slice path_;
absl::string_view method_;
diff --git a/src/cpp/ext/otel/BUILD b/src/cpp/ext/otel/BUILD
index 4c108176e78..b6f82fbfb19 100644
--- a/src/cpp/ext/otel/BUILD
+++ b/src/cpp/ext/otel/BUILD
@@ -68,7 +68,6 @@ grpc_cc_library(
"//:grpc_base",
"//:grpc_client_channel",
"//:grpc_public_hdrs",
- "//:legacy_context",
"//:tcp_tracer",
"//src/core:arena",
"//src/core:arena_promise",
diff --git a/src/cpp/ext/otel/otel_client_call_tracer.cc b/src/cpp/ext/otel/otel_client_call_tracer.cc
index 84123c0444e..1fdfe086d8b 100644
--- a/src/cpp/ext/otel/otel_client_call_tracer.cc
+++ b/src/cpp/ext/otel/otel_client_call_tracer.cc
@@ -46,7 +46,6 @@
#include "src/core/client_channel/client_channel_filter.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/status_util.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/promise/context.h"
diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc
index 00fa2769281..648fee9d5da 100644
--- a/src/cpp/server/server_context.cc
+++ b/src/cpp/server/server_context.cc
@@ -56,7 +56,6 @@
#include
#include
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/crash.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/sync.h"
diff --git a/test/core/call/yodel/yodel_test.h b/test/core/call/yodel/yodel_test.h
index 75b9b96a997..1ce31e051e6 100644
--- a/test/core/call/yodel/yodel_test.h
+++ b/test/core/call/yodel/yodel_test.h
@@ -363,7 +363,7 @@ class YodelTest : public ::testing::Test {
auto MakeCall(ClientMetadataHandle client_initial_metadata) {
return MakeCallPair(std::move(client_initial_metadata),
state_->event_engine.get(),
- state_->call_arena_allocator->MakeArena(), nullptr);
+ state_->call_arena_allocator->MakeArena());
}
void WaitForAllPendingWork();
diff --git a/test/core/channel/channel_stack_test.cc b/test/core/channel/channel_stack_test.cc
index a07dbf148b6..54566934a2a 100644
--- a/test/core/channel/channel_stack_test.cc
+++ b/test/core/channel/channel_stack_test.cc
@@ -125,7 +125,6 @@ TEST(ChannelStackTest, CreateChannelStack) {
const grpc_call_element_args args = {
call_stack, // call_stack
nullptr, // server_transport_data
- nullptr, // context
path, // path
gpr_get_cycle_counter(), // start_time
grpc_core::Timestamp::InfFuture(), // deadline
diff --git a/test/core/client_channel/connected_subchannel_test.cc b/test/core/client_channel/connected_subchannel_test.cc
index 78b00078da8..7065ba120ef 100644
--- a/test/core/client_channel/connected_subchannel_test.cc
+++ b/test/core/client_channel/connected_subchannel_test.cc
@@ -69,7 +69,7 @@ class ConnectedSubchannelTest : public YodelTest {
ClientMetadataHandle client_initial_metadata) {
return MakeCallPair(std::move(client_initial_metadata),
event_engine().get(),
- SimpleArenaAllocator()->MakeArena(), nullptr);
+ SimpleArenaAllocator()->MakeArena());
}
CallHandler TickUntilCallStarted() {
diff --git a/test/core/client_channel/load_balanced_call_destination_test.cc b/test/core/client_channel/load_balanced_call_destination_test.cc
index 6e7004bf471..ca4bfe8704c 100644
--- a/test/core/client_channel/load_balanced_call_destination_test.cc
+++ b/test/core/client_channel/load_balanced_call_destination_test.cc
@@ -51,7 +51,7 @@ class LoadBalancedCallDestinationTest : public YodelTest {
ClientMetadataHandle client_initial_metadata) {
return MakeCallPair(std::move(client_initial_metadata),
event_engine().get(),
- call_arena_allocator_->MakeArena(), nullptr);
+ call_arena_allocator_->MakeArena());
}
CallHandler TickUntilCallStarted() {
diff --git a/test/core/end2end/BUILD b/test/core/end2end/BUILD
index 597fb7c0c26..66bbb438979 100644
--- a/test/core/end2end/BUILD
+++ b/test/core/end2end/BUILD
@@ -344,8 +344,6 @@ grpc_core_end2end_test(name = "empty_batch")
grpc_core_end2end_test(name = "filter_causes_close")
-grpc_core_end2end_test(name = "filter_context")
-
grpc_core_end2end_test(name = "filter_init_fails")
grpc_core_end2end_test(name = "filtered_metadata")
diff --git a/test/core/end2end/grpc_core_end2end_test.bzl b/test/core/end2end/grpc_core_end2end_test.bzl
index 8b75ae6aac8..4c23868f131 100644
--- a/test/core/end2end/grpc_core_end2end_test.bzl
+++ b/test/core/end2end/grpc_core_end2end_test.bzl
@@ -63,7 +63,6 @@ def grpc_core_end2end_test(name, shard_count = 10, tags = []):
"//:grpc_security_base",
"//:grpc_trace",
"//:grpc_unsecure",
- "//:legacy_context",
"//:orphanable",
"//:promise",
"//:ref_counted_ptr",
diff --git a/test/core/end2end/tests/filter_context.cc b/test/core/end2end/tests/filter_context.cc
deleted file mode 100644
index 7d53047f971..00000000000
--- a/test/core/end2end/tests/filter_context.cc
+++ /dev/null
@@ -1,134 +0,0 @@
-//
-//
-// Copyright 2018 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.
-//
-//
-
-#include
-#include
-
-#include "absl/log/check.h"
-#include "absl/log/log.h"
-#include "absl/status/status.h"
-#include "gtest/gtest.h"
-
-#include
-
-#include "src/core/lib/channel/channel_fwd.h"
-#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
-#include "src/core/lib/config/core_configuration.h"
-#include "src/core/lib/experiments/experiments.h"
-#include "src/core/lib/gprpp/time.h"
-#include "src/core/lib/iomgr/closure.h"
-#include "src/core/lib/iomgr/error.h"
-#include "src/core/lib/surface/channel_stack_type.h"
-#include "src/core/lib/transport/transport.h"
-#include "test/core/end2end/end2end_tests.h"
-
-namespace grpc_core {
-namespace {
-
-//******************************************************************************
-// Test context filter
-//
-
-struct call_data {
- grpc_call_context_element* context;
-};
-
-grpc_error_handle init_call_elem(grpc_call_element* elem,
- const grpc_call_element_args* args) {
- call_data* calld = static_cast(elem->call_data);
- calld->context = args->context;
- LOG(INFO) << "init_call_elem(): context=" << args->context;
- return absl::OkStatus();
-}
-
-void start_transport_stream_op_batch(grpc_call_element* elem,
- grpc_transport_stream_op_batch* batch) {
- call_data* calld = static_cast(elem->call_data);
- // If batch payload context is not null (which will happen in some
- // cancellation cases), make sure we get the same context here that we
- // saw in init_call_elem().
- LOG(INFO) << "start_transport_stream_op_batch(): context="
- << batch->payload->context;
- if (batch->payload->context != nullptr) {
- CHECK(calld->context == batch->payload->context);
- }
- grpc_call_next_op(elem, batch);
-}
-
-void destroy_call_elem(grpc_call_element* /*elem*/,
- const grpc_call_final_info* /*final_info*/,
- grpc_closure* /*ignored*/) {}
-
-grpc_error_handle init_channel_elem(grpc_channel_element* /*elem*/,
- grpc_channel_element_args* /*args*/) {
- return absl::OkStatus();
-}
-
-void destroy_channel_elem(grpc_channel_element* /*elem*/) {}
-
-const grpc_channel_filter test_filter = {
- start_transport_stream_op_batch, nullptr, nullptr, grpc_channel_next_op,
- sizeof(call_data), init_call_elem,
- grpc_call_stack_ignore_set_pollset_or_pollset_set, destroy_call_elem, 0,
- init_channel_elem, grpc_channel_stack_no_post_init, destroy_channel_elem,
- grpc_channel_next_get_info,
- // Want to add the filter as close to the end as possible, to
- // make sure that all of the filters work well together.
- // However, we can't add it at the very end, because the
- // connected channel filter must be the last one.
- // Channel init code falls back to lexical ordering of filters if there are
- // otherwise no dependencies, so we leverage that.
- "zzzzzzz_filter_context"};
-
-// Simple request to test that filters see a consistent view of the
-// call context.
-CORE_END2END_TEST(CoreEnd2endTest, FilterContext) {
- SKIP_IF_CHAOTIC_GOOD();
- CoreConfiguration::RegisterBuilder([](CoreConfiguration::Builder* builder) {
- for (auto type : {GRPC_CLIENT_CHANNEL, GRPC_CLIENT_SUBCHANNEL,
- GRPC_CLIENT_DIRECT_CHANNEL, GRPC_SERVER_CHANNEL}) {
- builder->channel_init()->RegisterFilter(type, &test_filter);
- }
- });
- auto c = NewClientCall("/foo").Timeout(Duration::Seconds(5)).Create();
- CoreEnd2endTest::IncomingStatusOnClient server_status;
- CoreEnd2endTest::IncomingMetadata server_initial_metadata;
- c.NewBatch(1)
- .SendInitialMetadata({})
- .SendMessage("hello world")
- .SendCloseFromClient()
- .RecvInitialMetadata(server_initial_metadata)
- .RecvStatusOnClient(server_status);
- auto s = RequestCall(101);
- Expect(101, true);
- Step();
- CoreEnd2endTest::IncomingCloseOnServer client_close;
- s.NewBatch(102)
- .SendInitialMetadata({})
- .SendStatusFromServer(GRPC_STATUS_UNIMPLEMENTED, "xyz", {})
- .RecvCloseOnServer(client_close);
- Expect(102, true);
- Expect(1, true);
- Step();
- EXPECT_EQ(server_status.status(), GRPC_STATUS_UNIMPLEMENTED);
- EXPECT_EQ(server_status.message(), "xyz");
-}
-
-} // namespace
-} // namespace grpc_core
diff --git a/test/core/end2end/tests/http2_stats.cc b/test/core/end2end/tests/http2_stats.cc
index 3cc2e830822..c146d9ec832 100644
--- a/test/core/end2end/tests/http2_stats.cc
+++ b/test/core/end2end/tests/http2_stats.cc
@@ -31,7 +31,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/channel/promise_based_filter.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/experiments/experiments.h"
diff --git a/test/core/filters/filter_test.cc b/test/core/filters/filter_test.cc
index c6d11ddd56f..1c5151ee5d0 100644
--- a/test/core/filters/filter_test.cc
+++ b/test/core/filters/filter_test.cc
@@ -28,7 +28,6 @@
#include
#include "src/core/lib/channel/call_finalization.h"
-#include "src/core/lib/channel/context.h"
#include "src/core/lib/event_engine/default_event_engine.h"
#include "src/core/lib/gprpp/crash.h"
#include "src/core/lib/iomgr/timer_manager.h"
@@ -58,7 +57,6 @@ class FilterTestBase::Call::Impl
~Impl();
Arena* arena() { return arena_.get(); }
- grpc_call_context_element* legacy_context() { return legacy_context_; }
const std::shared_ptr& channel() const { return channel_; }
CallFinalization* call_finalization() { return &call_finalization_; }
@@ -109,19 +107,12 @@ class FilterTestBase::Call::Impl
absl::optional forward_server_initial_metadata_;
std::queue forward_client_to_server_messages_;
std::queue forward_server_to_client_messages_;
- // Contexts for various subsystems (security, tracing, ...).
- grpc_call_context_element legacy_context_[GRPC_CONTEXT_COUNT] = {};
};
FilterTestBase::Call::Impl::~Impl() {
if (!run_call_finalization_) {
call_finalization_.Run(nullptr);
}
- for (size_t i = 0; i < GRPC_CONTEXT_COUNT; ++i) {
- if (legacy_context_[i].destroy != nullptr) {
- legacy_context_[i].destroy(legacy_context_[i].value);
- }
- }
}
void FilterTestBase::Call::Impl::Start(ClientMetadataHandle md) {
@@ -277,7 +268,6 @@ bool FilterTestBase::Call::Impl::StepOnce() {
class FilterTestBase::Call::ScopedContext final
: public Activity,
public promise_detail::Context,
- public promise_detail::Context,
public promise_detail::Context {
private:
class TestWakeable final : public Wakeable {
@@ -305,8 +295,6 @@ class FilterTestBase::Call::ScopedContext final
public:
explicit ScopedContext(std::shared_ptr impl)
: promise_detail::Context(impl->arena()),
- promise_detail::Context(
- impl->legacy_context()),
promise_detail::Context(impl->call_finalization()),
impl_(std::move(impl)) {}
diff --git a/test/core/surface/channel_init_test.cc b/test/core/surface/channel_init_test.cc
index 67c35c482fd..07a1a4b300e 100644
--- a/test/core/surface/channel_init_test.cc
+++ b/test/core/surface/channel_init_test.cc
@@ -268,7 +268,7 @@ TEST(ChannelInitTest, CanCreateFilterWithCall) {
"test"),
1024);
auto call = MakeCallPair(Arena::MakePooled(), nullptr,
- allocator->MakeArena(), nullptr);
+ allocator->MakeArena());
(*stack)->StartCall(std::move(call.handler));
EXPECT_EQ(p, 1);
EXPECT_EQ(handled, 1);
diff --git a/test/core/transport/binder/binder_transport_test.cc b/test/core/transport/binder/binder_transport_test.cc
index 933648a6a22..bc42040826c 100644
--- a/test/core/transport/binder/binder_transport_test.cc
+++ b/test/core/transport/binder/binder_transport_test.cc
@@ -379,7 +379,7 @@ TEST_F(BinderTransportTest, PerformSendInitialMetadata) {
grpc_core::ExecCtx exec_ctx;
grpc_binder_stream* gbs = InitNewBinderStream();
grpc_transport_stream_op_batch op{};
- grpc_transport_stream_op_batch_payload payload(nullptr);
+ grpc_transport_stream_op_batch_payload payload;
op.payload = &payload;
const Metadata kInitialMetadata = kDefaultMetadata;
MakeSendInitialMetadata send_initial_metadata(kInitialMetadata, "", &op);
@@ -399,7 +399,7 @@ TEST_F(BinderTransportTest, PerformSendInitialMetadataMethodRef) {
grpc_core::ExecCtx exec_ctx;
grpc_binder_stream* gbs = InitNewBinderStream();
grpc_transport_stream_op_batch op{};
- grpc_transport_stream_op_batch_payload payload(nullptr);
+ grpc_transport_stream_op_batch_payload payload;
op.payload = &payload;
const Metadata kInitialMetadata = kDefaultMetadata;
const std::string kMethodRef = kDefaultMethodRef;
@@ -422,7 +422,7 @@ TEST_F(BinderTransportTest, PerformSendMessage) {
grpc_core::ExecCtx exec_ctx;
grpc_binder_stream* gbs = InitNewBinderStream();
grpc_transport_stream_op_batch op{};
- grpc_transport_stream_op_batch_payload payload(nullptr);
+ grpc_transport_stream_op_batch_payload payload;
op.payload = &payload;
const std::string kMessage = kDefaultMessage;
@@ -444,7 +444,7 @@ TEST_F(BinderTransportTest, PerformSendTrailingMetadata) {
grpc_core::ExecCtx exec_ctx;
grpc_binder_stream* gbs = InitNewBinderStream();
grpc_transport_stream_op_batch op{};
- grpc_transport_stream_op_batch_payload payload(nullptr);
+ grpc_transport_stream_op_batch_payload payload;
op.payload = &payload;
// The wireformat guarantees that suffix metadata will always be empty.
// TODO(waynetu): Check whether gRPC can internally add extra trailing
@@ -467,7 +467,7 @@ TEST_F(BinderTransportTest, PerformSendAll) {
grpc_core::ExecCtx exec_ctx;
grpc_binder_stream* gbs = InitNewBinderStream();
grpc_transport_stream_op_batch op{};
- grpc_transport_stream_op_batch_payload payload(nullptr);
+ grpc_transport_stream_op_batch_payload payload;
op.payload = &payload;
const Metadata kInitialMetadata = kDefaultMetadata;
@@ -502,7 +502,7 @@ TEST_F(BinderTransportTest, PerformRecvInitialMetadata) {
grpc_core::ExecCtx exec_ctx;
grpc_binder_stream* gbs = InitNewBinderStream();
grpc_transport_stream_op_batch op{};
- grpc_transport_stream_op_batch_payload payload(nullptr);
+ grpc_transport_stream_op_batch_payload payload;
op.payload = &payload;
MakeRecvInitialMetadata recv_initial_metadata(&op);
@@ -523,7 +523,7 @@ TEST_F(BinderTransportTest, PerformRecvInitialMetadataWithMethodRef) {
grpc_core::ExecCtx exec_ctx;
grpc_binder_stream* gbs = InitNewBinderStream();
grpc_transport_stream_op_batch op{};
- grpc_transport_stream_op_batch_payload payload(nullptr);
+ grpc_transport_stream_op_batch_payload payload;
op.payload = &payload;
MakeRecvInitialMetadata recv_initial_metadata(&op);
@@ -545,7 +545,7 @@ TEST_F(BinderTransportTest, PerformRecvMessage) {
grpc_core::ExecCtx exec_ctx;
grpc_binder_stream* gbs = InitNewBinderStream();
grpc_transport_stream_op_batch op{};
- grpc_transport_stream_op_batch_payload payload(nullptr);
+ grpc_transport_stream_op_batch_payload payload;
op.payload = &payload;
MakeRecvMessage recv_message(&op);
@@ -565,7 +565,7 @@ TEST_F(BinderTransportTest, PerformRecvTrailingMetadata) {
grpc_core::ExecCtx exec_ctx;
grpc_binder_stream* gbs = InitNewBinderStream();
grpc_transport_stream_op_batch op{};
- grpc_transport_stream_op_batch_payload payload(nullptr);
+ grpc_transport_stream_op_batch_payload payload;
op.payload = &payload;
MakeRecvTrailingMetadata recv_trailing_metadata(&op);
@@ -587,7 +587,7 @@ TEST_F(BinderTransportTest, PerformRecvAll) {
grpc_core::ExecCtx exec_ctx;
grpc_binder_stream* gbs = InitNewBinderStream();
grpc_transport_stream_op_batch op{};
- grpc_transport_stream_op_batch_payload payload(nullptr);
+ grpc_transport_stream_op_batch_payload payload;
op.payload = &payload;
MakeRecvInitialMetadata recv_initial_metadata(&op);
@@ -623,7 +623,7 @@ TEST_F(BinderTransportTest, PerformAllOps) {
grpc_core::ExecCtx exec_ctx;
grpc_binder_stream* gbs = InitNewBinderStream();
grpc_transport_stream_op_batch op{};
- grpc_transport_stream_op_batch_payload payload(nullptr);
+ grpc_transport_stream_op_batch_payload payload;
op.payload = &payload;
const Metadata kSendInitialMetadata = kDefaultMetadata;
@@ -706,13 +706,13 @@ TEST_F(BinderTransportTest, WireWriterRpcCallErrorPropagates) {
const Metadata kInitialMetadata = {};
grpc_transport_stream_op_batch op1{};
- grpc_transport_stream_op_batch_payload payload1(nullptr);
+ grpc_transport_stream_op_batch_payload payload1;
op1.payload = &payload1;
MakeSendInitialMetadata send_initial_metadata1(kInitialMetadata, "", &op1);
op1.on_complete = mock_on_complete1.GetGrpcClosure();
grpc_transport_stream_op_batch op2{};
- grpc_transport_stream_op_batch_payload payload2(nullptr);
+ grpc_transport_stream_op_batch_payload payload2;
op2.payload = &payload2;
MakeSendInitialMetadata send_initial_metadata2(kInitialMetadata, "", &op2);
op2.on_complete = mock_on_complete2.GetGrpcClosure();
diff --git a/test/core/transport/chaotic_good/client_transport_error_test.cc b/test/core/transport/chaotic_good/client_transport_error_test.cc
index 0dcc5595c07..57109b8b535 100644
--- a/test/core/transport/chaotic_good/client_transport_error_test.cc
+++ b/test/core/transport/chaotic_good/client_transport_error_test.cc
@@ -142,7 +142,7 @@ class ClientTransportTest : public ::testing::Test {
auto MakeCall(ClientMetadataHandle client_initial_metadata) {
return MakeCallPair(std::move(client_initial_metadata), event_engine_.get(),
- call_arena_allocator_->MakeArena(), nullptr);
+ call_arena_allocator_->MakeArena());
}
private:
diff --git a/test/core/transport/chaotic_good/transport_test.h b/test/core/transport/chaotic_good/transport_test.h
index a67a5ca7065..968e60e2c79 100644
--- a/test/core/transport/chaotic_good/transport_test.h
+++ b/test/core/transport/chaotic_good/transport_test.h
@@ -46,7 +46,7 @@ class TransportTest : public ::testing::Test {
auto MakeCall(ClientMetadataHandle client_initial_metadata) {
return MakeCallPair(std::move(client_initial_metadata), event_engine_.get(),
- MakeArena(), nullptr);
+ MakeArena());
}
private:
diff --git a/test/core/transport/interception_chain_test.cc b/test/core/transport/interception_chain_test.cc
index 0763ab01a81..91ab82e54eb 100644
--- a/test/core/transport/interception_chain_test.cc
+++ b/test/core/transport/interception_chain_test.cc
@@ -231,7 +231,7 @@ class InterceptionChainTest : public ::testing::Test {
// Run a call through a UnstartedCallDestination until it's complete.
FinishedCall RunCall(UnstartedCallDestination* destination) {
auto call = MakeCallPair(Arena::MakePooled(), nullptr,
- call_arena_allocator_->MakeArena(), nullptr);
+ call_arena_allocator_->MakeArena());
Poll trailing_md;
call.initiator.SpawnInfallible(
"run_call", [destination, &call, &trailing_md]() mutable {
diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal
index a10113a9727..405c36cf92d 100644
--- a/tools/doxygen/Doxyfile.c++.internal
+++ b/tools/doxygen/Doxyfile.c++.internal
@@ -2112,7 +2112,6 @@ src/core/lib/channel/channel_stack_trace.cc \
src/core/lib/channel/channel_stack_trace.h \
src/core/lib/channel/connected_channel.cc \
src/core/lib/channel/connected_channel.h \
-src/core/lib/channel/context.h \
src/core/lib/channel/promise_based_filter.cc \
src/core/lib/channel/promise_based_filter.h \
src/core/lib/channel/status_util.cc \
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index e51c424f306..3506439e7e9 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -1884,7 +1884,6 @@ src/core/lib/channel/channel_stack_trace.cc \
src/core/lib/channel/channel_stack_trace.h \
src/core/lib/channel/connected_channel.cc \
src/core/lib/channel/connected_channel.h \
-src/core/lib/channel/context.h \
src/core/lib/channel/promise_based_filter.cc \
src/core/lib/channel/promise_based_filter.h \
src/core/lib/channel/status_util.cc \
diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json
index 17e26c19e11..b45248aa268 100644
--- a/tools/run_tests/generated/tests.json
+++ b/tools/run_tests/generated/tests.json
@@ -3603,30 +3603,6 @@
],
"uses_polling": true
},
- {
- "args": [],
- "benchmark": false,
- "ci_platforms": [
- "linux",
- "mac",
- "posix",
- "windows"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "gtest": true,
- "language": "c++",
- "name": "filter_context_test",
- "platforms": [
- "linux",
- "mac",
- "posix",
- "windows"
- ],
- "uses_polling": true
- },
{
"args": [],
"benchmark": false,