grpc 1.82.2 → 1.83.0.pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +8 -5
- data/etc/roots.pem +10400 -3855
- data/include/grpc/grpc_audit_logging.h +2 -2
- data/include/grpc/grpc_security_constants.h +2 -0
- data/include/grpc/impl/channel_arg_names.h +23 -0
- data/src/core/call/call_filters.h +19 -3
- data/src/core/call/call_spine.h +4 -4
- data/src/core/call/client_call.cc +1 -1
- data/src/core/call/metadata.cc +7 -2
- data/src/core/call/server_call.cc +13 -3
- data/src/core/call/server_call.h +5 -3
- data/src/core/client_channel/backup_poller.cc +2 -17
- data/src/core/client_channel/client_channel.cc +17 -14
- data/src/core/client_channel/client_channel.h +3 -1
- data/src/core/client_channel/client_channel_filter.cc +11 -13
- data/src/core/client_channel/client_channel_service_config.cc +5 -13
- data/src/core/client_channel/direct_channel.cc +5 -1
- data/src/core/client_channel/direct_channel.h +3 -1
- data/src/core/config/experiment_env_var.cc +30 -0
- data/src/core/config/experiment_env_var.h +26 -0
- data/src/core/credentials/call/regional_access_boundary_fetcher.cc +6 -6
- data/src/core/credentials/transport/ssl/ssl_security_connector.cc +14 -2
- data/src/core/credentials/transport/tls/grpc_tls_certificate_selector.cc +172 -0
- data/src/core/credentials/transport/tls/grpc_tls_certificate_selector.h +103 -0
- data/src/core/credentials/transport/tls/load_system_roots_fallback.cc +3 -2
- data/src/core/credentials/transport/tls/load_system_roots_supported.cc +10 -3
- data/src/core/credentials/transport/tls/tls_security_connector.cc +14 -2
- data/src/core/credentials/transport/xds/xds_credentials.cc +4 -12
- data/src/core/ext/filters/http/message_compress/compression_filter.cc +32 -25
- data/src/core/ext/filters/http/message_compress/compression_filter.h +1 -0
- data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +2 -1
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +19 -13
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +14 -57
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/flow_control.h +3 -2
- data/src/core/ext/transport/chttp2/transport/frame.cc +58 -1
- data/src/core/ext/transport/chttp2/transport/frame.h +13 -1
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +2 -34
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +23 -55
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +0 -1
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +2 -4
- data/src/core/ext/transport/chttp2/transport/frame_security.cc +10 -1
- data/src/core/ext/transport/chttp2/transport/frame_security.h +2 -1
- data/src/core/ext/transport/chttp2/transport/goaway.cc +11 -1
- data/src/core/ext/transport/chttp2/transport/goaway.h +17 -1
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +9 -0
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +117 -276
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +44 -17
- data/src/core/ext/transport/chttp2/transport/http2_server_transport.cc +382 -496
- data/src/core/ext/transport/chttp2/transport/http2_server_transport.h +75 -77
- data/src/core/ext/transport/chttp2/transport/http2_settings.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +30 -11
- data/src/core/ext/transport/chttp2/transport/http2_settings_promises.h +24 -9
- data/src/core/ext/transport/chttp2/transport/http2_transport.cc +26 -0
- data/src/core/ext/transport/chttp2/transport/http2_transport.h +2 -0
- data/src/core/ext/transport/chttp2/transport/internal.h +4 -6
- data/src/core/ext/transport/chttp2/transport/parsing.cc +3 -10
- data/src/core/ext/transport/chttp2/transport/ping_promise.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +4 -10
- data/src/core/ext/transport/chttp2/transport/read_context.h +62 -20
- data/src/core/ext/transport/chttp2/transport/security_frame.h +1 -0
- data/src/core/ext/transport/chttp2/transport/stream.h +271 -120
- data/src/core/ext/transport/chttp2/transport/stream_data_queue.h +77 -61
- data/src/core/handshaker/security/secure_endpoint.cc +0 -13
- data/src/core/lib/channel/promise_based_filter.cc +77 -3
- data/src/core/lib/channel/promise_based_filter.h +238 -184
- data/src/core/lib/compression/message_compress.cc +97 -132
- data/src/core/lib/compression/message_compress.h +0 -24
- data/src/core/lib/event_engine/extensions/receive_coalescing_extension.h +0 -4
- data/src/core/lib/event_engine/extensions/tcp_trace.h +1 -1
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +2 -12
- data/src/core/lib/event_engine/shim.cc +2 -16
- data/src/core/lib/event_engine/shim.h +0 -4
- data/src/core/lib/experiments/experiments.cc +57 -123
- data/src/core/lib/experiments/experiments.h +43 -82
- data/src/core/lib/iomgr/error.cc +3 -73
- data/src/core/lib/iomgr/error.h +8 -6
- data/src/core/lib/iomgr/error_cfstream.cc +1 -2
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +2 -6
- data/src/core/lib/iomgr/ev_poll_posix.cc +2 -6
- data/src/core/lib/iomgr/tcp_posix.cc +2 -6
- data/src/core/lib/security/authorization/audit_logging.cc +2 -2
- data/src/core/lib/security/authorization/audit_logging.h +3 -3
- data/src/core/lib/security/authorization/grpc_authorization_engine.cc +11 -13
- data/src/core/lib/security/authorization/grpc_authorization_engine.h +1 -1
- data/src/core/lib/security/authorization/matchers.cc +20 -20
- data/src/core/lib/security/authorization/matchers.h +15 -16
- data/src/core/lib/security/authorization/rbac_policy.h +1 -1
- data/src/core/lib/security/authorization/stdout_logger.cc +3 -3
- data/src/core/lib/security/authorization/stdout_logger.h +6 -5
- data/src/core/lib/surface/call.cc +0 -8
- data/src/core/lib/surface/call.h +2 -0
- data/src/core/lib/surface/channel.cc +21 -2
- data/src/core/lib/surface/channel.h +14 -6
- data/src/core/lib/surface/filter_stack_call.cc +10 -29
- data/src/core/lib/surface/legacy_channel.cc +7 -7
- data/src/core/lib/surface/legacy_channel.h +3 -1
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/bdp_estimator.cc +13 -13
- data/src/core/lib/transport/bdp_estimator.h +9 -5
- data/src/core/lib/transport/error_utils.cc +26 -138
- data/src/core/lib/transport/promise_endpoint.h +2 -4
- data/src/core/load_balancing/grpclb/grpclb.cc +2 -1
- data/src/core/load_balancing/pick_first/pick_first.cc +33 -2
- data/src/core/load_balancing/pick_first/pick_first.h +6 -0
- data/src/core/load_balancing/ring_hash/ring_hash.cc +3 -10
- data/src/core/load_balancing/rls/rls.cc +2 -1
- data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc +2 -7
- data/src/core/load_balancing/xds/cds.cc +80 -56
- data/src/core/load_balancing/xds/cds.h +21 -0
- data/src/core/mitigation_engine/mitigation.h +53 -0
- data/src/core/mitigation_engine/mitigation_provider.h +62 -0
- data/src/core/resolver/dns/dns_resolver_plugin.cc +1 -6
- data/src/core/resolver/xds/xds_resolver.cc +14 -11
- data/src/core/server/server.h +1 -4
- data/src/core/server/server_config_selector.h +5 -4
- data/src/core/server/server_config_selector_filter.cc +67 -80
- data/src/core/server/xds_server_config_fetcher.cc +681 -692
- data/src/core/server/xds_server_config_fetcher_legacy.cc +15 -12
- data/src/core/telemetry/call_tracer.cc +49 -2
- data/src/core/telemetry/call_tracer.h +1 -0
- data/src/core/telemetry/tcp_tracer.h +38 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +1 -1
- data/src/core/tsi/ssl_telemetry_utils.cc +343 -0
- data/src/core/tsi/ssl_telemetry_utils.h +74 -0
- data/src/core/tsi/ssl_transport_security.cc +577 -301
- data/src/core/tsi/ssl_transport_security.h +22 -6
- data/src/core/tsi/ssl_transport_security_utils.cc +2 -0
- data/src/core/tsi/transport_security.h +7 -0
- data/src/core/util/http_client/httpcli.cc +1 -4
- data/src/core/util/http_client/httpcli_security_connector.cc +2 -1
- data/src/core/util/status_helper.cc +71 -192
- data/src/core/util/status_helper.h +16 -21
- data/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc +2 -11
- data/src/core/xds/grpc/xds_bootstrap_grpc.cc +2 -7
- data/src/core/xds/grpc/xds_cluster_parser.cc +5 -16
- data/src/core/xds/grpc/xds_common_types.cc +94 -38
- data/src/core/xds/grpc/xds_common_types.h +33 -18
- data/src/core/xds/grpc/xds_common_types_parser.cc +168 -100
- data/src/core/xds/grpc/xds_common_types_parser.h +18 -1
- data/src/core/xds/grpc/xds_endpoint_parser.cc +6 -17
- data/src/core/xds/grpc/xds_http_filter_registry.cc +2 -10
- data/src/core/xds/grpc/xds_http_rbac_filter.cc +3 -12
- data/src/core/xds/grpc/xds_metadata_parser.cc +0 -2
- data/src/core/xds/grpc/xds_route_config_parser.cc +7 -11
- data/src/core/xds/grpc/xds_routing.cc +113 -82
- data/src/core/xds/grpc/xds_routing.h +70 -20
- data/src/core/xds/grpc/xds_server_grpc.cc +22 -13
- data/src/core/xds/grpc/xds_server_grpc.h +16 -2
- data/src/core/xds/grpc/xds_server_grpc_interface.h +10 -0
- data/src/core/xds/grpc/xds_transport_grpc.cc +123 -18
- data/src/core/xds/grpc/xds_transport_grpc.h +28 -4
- data/src/core/xds/xds_client/lrs_client.cc +3 -7
- data/src/core/xds/xds_client/xds_bootstrap.cc +4 -16
- data/src/core/xds/xds_client/xds_client.cc +2 -15
- data/src/core/xds/xds_client/xds_transport.h +3 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +1 -1
- metadata +10 -2
|
@@ -71,11 +71,10 @@ inline bool IsCallTracerSendTrailingMetadataIsAnAnnotationEnabled() {
|
|
|
71
71
|
inline bool IsCallv3BatchValidationEnabled() { return true; }
|
|
72
72
|
#define GRPC_EXPERIMENT_IS_INCLUDED_CHAOTIC_GOOD_FRAMING_LAYER
|
|
73
73
|
inline bool IsChaoticGoodFramingLayerEnabled() { return true; }
|
|
74
|
-
|
|
74
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_CHAOTIC_GOOD_SEND_SUPPORTED_FEATURES
|
|
75
|
+
inline bool IsChaoticGoodSendSupportedFeaturesEnabled() { return true; }
|
|
75
76
|
#define GRPC_EXPERIMENT_IS_INCLUDED_CUSTOM_FRAME_CHECK
|
|
76
77
|
inline bool IsCustomFrameCheckEnabled() { return true; }
|
|
77
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_ERROR_FLATTEN
|
|
78
|
-
inline bool IsErrorFlattenEnabled() { return true; }
|
|
79
78
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_CLIENT
|
|
80
79
|
inline bool IsEventEngineClientEnabled() { return true; }
|
|
81
80
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_DNS
|
|
@@ -90,27 +89,19 @@ inline bool IsEventEngineListenerEnabled() { return true; }
|
|
|
90
89
|
inline bool IsEventEngineCallbackCqEnabled() { return true; }
|
|
91
90
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_FOR_ALL_OTHER_ENDPOINTS
|
|
92
91
|
inline bool IsEventEngineForAllOtherEndpointsEnabled() { return true; }
|
|
93
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_POLLER_FOR_PYTHON
|
|
94
|
-
inline bool IsEventEnginePollerForPythonEnabled() { return true; }
|
|
95
92
|
inline bool IsFailRecvMetadataOnDeadlineExceededEnabled() { return false; }
|
|
96
93
|
inline bool IsFreeLargeAllocatorEnabled() { return false; }
|
|
97
94
|
inline bool IsFuseFiltersEnabled() { return false; }
|
|
98
95
|
inline bool IsH2MaxDeallocatingStreamsHeadroomEnabled() { return false; }
|
|
99
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_HEADER_DATA_FRAME
|
|
100
|
-
inline bool IsHeaderDataFrameEnabled() { return true; }
|
|
101
96
|
#define GRPC_EXPERIMENT_IS_INCLUDED_INPROC_CANCEL_STREAM
|
|
102
97
|
inline bool IsInprocCancelStreamEnabled() { return true; }
|
|
103
98
|
inline bool IsKeepAlivePingTimerBatchEnabled() { return false; }
|
|
104
99
|
inline bool IsLocalConnectorSecureEnabled() { return false; }
|
|
105
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_MAX_INFLIGHT_PINGS_STRICT_LIMIT
|
|
106
|
-
inline bool IsMaxInflightPingsStrictLimitEnabled() { return true; }
|
|
107
100
|
inline bool IsMemoryOptimization01Enabled() { return false; }
|
|
108
101
|
inline bool IsMemoryOptimization02Enabled() { return false; }
|
|
109
|
-
|
|
110
|
-
inline bool IsMessageSizeRefactoringEnabled() { return true; }
|
|
102
|
+
inline bool IsMessageSizeRefactoringEnabled() { return false; }
|
|
111
103
|
inline bool IsMetadataOutstandingTokenRefactorEnabled() { return false; }
|
|
112
|
-
|
|
113
|
-
inline bool IsMetadataPublishToAppTagEnabled() { return true; }
|
|
104
|
+
inline bool IsMetadataPublishToAppTagEnabled() { return false; }
|
|
114
105
|
#define GRPC_EXPERIMENT_IS_INCLUDED_MONITORING_EXPERIMENT
|
|
115
106
|
inline bool IsMonitoringExperimentEnabled() { return true; }
|
|
116
107
|
inline bool IsMultipingEnabled() { return false; }
|
|
@@ -122,11 +113,12 @@ inline bool IsOptimization02Enabled() { return true; }
|
|
|
122
113
|
inline bool IsOptimization03Enabled() { return true; }
|
|
123
114
|
#define GRPC_EXPERIMENT_IS_INCLUDED_OPTIMIZATION_04
|
|
124
115
|
inline bool IsOptimization04Enabled() { return true; }
|
|
116
|
+
inline bool IsOptimization05Enabled() { return false; }
|
|
117
|
+
inline bool IsOptimization06Enabled() { return false; }
|
|
125
118
|
inline bool IsOtelExportTelemetryDomainsEnabled() { return false; }
|
|
126
119
|
inline bool IsPh2ClientEnabled() { return false; }
|
|
127
120
|
inline bool IsPh2ClientServerEnabled() { return false; }
|
|
128
|
-
|
|
129
|
-
inline bool IsPh2Perf01Enabled() { return true; }
|
|
121
|
+
inline bool IsPh2Perf01Enabled() { return false; }
|
|
130
122
|
inline bool IsPh2ServerEnabled() { return false; }
|
|
131
123
|
inline bool IsPickFirstIgnoreEmptyUpdatesEnabled() { return false; }
|
|
132
124
|
inline bool IsPipelinedReadSecureEndpointEnabled() { return false; }
|
|
@@ -137,15 +129,15 @@ inline bool IsPromiseBasedInprocTransportEnabled() { return false; }
|
|
|
137
129
|
inline bool IsPromiseBatchCleanupOnCancelEnabled() { return true; }
|
|
138
130
|
inline bool IsPromiseFilterSendCancelMetadataEnabled() { return false; }
|
|
139
131
|
inline bool IsRetryInCallv3Enabled() { return false; }
|
|
140
|
-
|
|
132
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_RETURN_PREEXISTING_ERRORS
|
|
133
|
+
inline bool IsReturnPreexistingErrorsEnabled() { return true; }
|
|
141
134
|
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
|
|
142
135
|
inline bool IsSecureEndpointOffloadLargeReadsEnabled() { return false; }
|
|
143
136
|
inline bool IsSecureEndpointOffloadLargeWritesEnabled() { return false; }
|
|
144
137
|
inline bool IsSecureEndpointReadCoalescingEnabled() { return false; }
|
|
145
138
|
inline bool IsSkipClearPeerOnCancellationEnabled() { return false; }
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
inline bool IsSubchannelWrapperCleanupOnOrphanEnabled() { return true; }
|
|
139
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_SUBCHANNEL_CONNECTION_SCALING
|
|
140
|
+
inline bool IsSubchannelConnectionScalingEnabled() { return true; }
|
|
149
141
|
inline bool IsTcpFrameSizeTuningEnabled() { return false; }
|
|
150
142
|
inline bool IsTcpRcvLowatEnabled() { return false; }
|
|
151
143
|
inline bool IsTsiFrameProtectorWithoutLocksEnabled() { return false; }
|
|
@@ -171,11 +163,10 @@ inline bool IsCallTracerSendTrailingMetadataIsAnAnnotationEnabled() {
|
|
|
171
163
|
inline bool IsCallv3BatchValidationEnabled() { return true; }
|
|
172
164
|
#define GRPC_EXPERIMENT_IS_INCLUDED_CHAOTIC_GOOD_FRAMING_LAYER
|
|
173
165
|
inline bool IsChaoticGoodFramingLayerEnabled() { return true; }
|
|
174
|
-
|
|
166
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_CHAOTIC_GOOD_SEND_SUPPORTED_FEATURES
|
|
167
|
+
inline bool IsChaoticGoodSendSupportedFeaturesEnabled() { return true; }
|
|
175
168
|
#define GRPC_EXPERIMENT_IS_INCLUDED_CUSTOM_FRAME_CHECK
|
|
176
169
|
inline bool IsCustomFrameCheckEnabled() { return true; }
|
|
177
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_ERROR_FLATTEN
|
|
178
|
-
inline bool IsErrorFlattenEnabled() { return true; }
|
|
179
170
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_CLIENT
|
|
180
171
|
inline bool IsEventEngineClientEnabled() { return true; }
|
|
181
172
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_DNS
|
|
@@ -190,27 +181,19 @@ inline bool IsEventEngineListenerEnabled() { return true; }
|
|
|
190
181
|
inline bool IsEventEngineCallbackCqEnabled() { return true; }
|
|
191
182
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_FOR_ALL_OTHER_ENDPOINTS
|
|
192
183
|
inline bool IsEventEngineForAllOtherEndpointsEnabled() { return true; }
|
|
193
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_POLLER_FOR_PYTHON
|
|
194
|
-
inline bool IsEventEnginePollerForPythonEnabled() { return true; }
|
|
195
184
|
inline bool IsFailRecvMetadataOnDeadlineExceededEnabled() { return false; }
|
|
196
185
|
inline bool IsFreeLargeAllocatorEnabled() { return false; }
|
|
197
186
|
inline bool IsFuseFiltersEnabled() { return false; }
|
|
198
187
|
inline bool IsH2MaxDeallocatingStreamsHeadroomEnabled() { return false; }
|
|
199
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_HEADER_DATA_FRAME
|
|
200
|
-
inline bool IsHeaderDataFrameEnabled() { return true; }
|
|
201
188
|
#define GRPC_EXPERIMENT_IS_INCLUDED_INPROC_CANCEL_STREAM
|
|
202
189
|
inline bool IsInprocCancelStreamEnabled() { return true; }
|
|
203
190
|
inline bool IsKeepAlivePingTimerBatchEnabled() { return false; }
|
|
204
191
|
inline bool IsLocalConnectorSecureEnabled() { return false; }
|
|
205
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_MAX_INFLIGHT_PINGS_STRICT_LIMIT
|
|
206
|
-
inline bool IsMaxInflightPingsStrictLimitEnabled() { return true; }
|
|
207
192
|
inline bool IsMemoryOptimization01Enabled() { return false; }
|
|
208
193
|
inline bool IsMemoryOptimization02Enabled() { return false; }
|
|
209
|
-
|
|
210
|
-
inline bool IsMessageSizeRefactoringEnabled() { return true; }
|
|
194
|
+
inline bool IsMessageSizeRefactoringEnabled() { return false; }
|
|
211
195
|
inline bool IsMetadataOutstandingTokenRefactorEnabled() { return false; }
|
|
212
|
-
|
|
213
|
-
inline bool IsMetadataPublishToAppTagEnabled() { return true; }
|
|
196
|
+
inline bool IsMetadataPublishToAppTagEnabled() { return false; }
|
|
214
197
|
#define GRPC_EXPERIMENT_IS_INCLUDED_MONITORING_EXPERIMENT
|
|
215
198
|
inline bool IsMonitoringExperimentEnabled() { return true; }
|
|
216
199
|
inline bool IsMultipingEnabled() { return false; }
|
|
@@ -222,11 +205,12 @@ inline bool IsOptimization02Enabled() { return true; }
|
|
|
222
205
|
inline bool IsOptimization03Enabled() { return true; }
|
|
223
206
|
#define GRPC_EXPERIMENT_IS_INCLUDED_OPTIMIZATION_04
|
|
224
207
|
inline bool IsOptimization04Enabled() { return true; }
|
|
208
|
+
inline bool IsOptimization05Enabled() { return false; }
|
|
209
|
+
inline bool IsOptimization06Enabled() { return false; }
|
|
225
210
|
inline bool IsOtelExportTelemetryDomainsEnabled() { return false; }
|
|
226
211
|
inline bool IsPh2ClientEnabled() { return false; }
|
|
227
212
|
inline bool IsPh2ClientServerEnabled() { return false; }
|
|
228
|
-
|
|
229
|
-
inline bool IsPh2Perf01Enabled() { return true; }
|
|
213
|
+
inline bool IsPh2Perf01Enabled() { return false; }
|
|
230
214
|
inline bool IsPh2ServerEnabled() { return false; }
|
|
231
215
|
inline bool IsPickFirstIgnoreEmptyUpdatesEnabled() { return false; }
|
|
232
216
|
inline bool IsPipelinedReadSecureEndpointEnabled() { return false; }
|
|
@@ -237,15 +221,15 @@ inline bool IsPromiseBasedInprocTransportEnabled() { return false; }
|
|
|
237
221
|
inline bool IsPromiseBatchCleanupOnCancelEnabled() { return true; }
|
|
238
222
|
inline bool IsPromiseFilterSendCancelMetadataEnabled() { return false; }
|
|
239
223
|
inline bool IsRetryInCallv3Enabled() { return false; }
|
|
240
|
-
|
|
224
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_RETURN_PREEXISTING_ERRORS
|
|
225
|
+
inline bool IsReturnPreexistingErrorsEnabled() { return true; }
|
|
241
226
|
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
|
|
242
227
|
inline bool IsSecureEndpointOffloadLargeReadsEnabled() { return false; }
|
|
243
228
|
inline bool IsSecureEndpointOffloadLargeWritesEnabled() { return false; }
|
|
244
229
|
inline bool IsSecureEndpointReadCoalescingEnabled() { return false; }
|
|
245
230
|
inline bool IsSkipClearPeerOnCancellationEnabled() { return false; }
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
inline bool IsSubchannelWrapperCleanupOnOrphanEnabled() { return true; }
|
|
231
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_SUBCHANNEL_CONNECTION_SCALING
|
|
232
|
+
inline bool IsSubchannelConnectionScalingEnabled() { return true; }
|
|
249
233
|
inline bool IsTcpFrameSizeTuningEnabled() { return false; }
|
|
250
234
|
inline bool IsTcpRcvLowatEnabled() { return false; }
|
|
251
235
|
inline bool IsTsiFrameProtectorWithoutLocksEnabled() { return false; }
|
|
@@ -271,11 +255,10 @@ inline bool IsCallTracerSendTrailingMetadataIsAnAnnotationEnabled() {
|
|
|
271
255
|
inline bool IsCallv3BatchValidationEnabled() { return true; }
|
|
272
256
|
#define GRPC_EXPERIMENT_IS_INCLUDED_CHAOTIC_GOOD_FRAMING_LAYER
|
|
273
257
|
inline bool IsChaoticGoodFramingLayerEnabled() { return true; }
|
|
274
|
-
|
|
258
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_CHAOTIC_GOOD_SEND_SUPPORTED_FEATURES
|
|
259
|
+
inline bool IsChaoticGoodSendSupportedFeaturesEnabled() { return true; }
|
|
275
260
|
#define GRPC_EXPERIMENT_IS_INCLUDED_CUSTOM_FRAME_CHECK
|
|
276
261
|
inline bool IsCustomFrameCheckEnabled() { return true; }
|
|
277
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_ERROR_FLATTEN
|
|
278
|
-
inline bool IsErrorFlattenEnabled() { return true; }
|
|
279
262
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_CLIENT
|
|
280
263
|
inline bool IsEventEngineClientEnabled() { return true; }
|
|
281
264
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_DNS
|
|
@@ -290,27 +273,19 @@ inline bool IsEventEngineListenerEnabled() { return true; }
|
|
|
290
273
|
inline bool IsEventEngineCallbackCqEnabled() { return true; }
|
|
291
274
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_FOR_ALL_OTHER_ENDPOINTS
|
|
292
275
|
inline bool IsEventEngineForAllOtherEndpointsEnabled() { return true; }
|
|
293
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_POLLER_FOR_PYTHON
|
|
294
|
-
inline bool IsEventEnginePollerForPythonEnabled() { return true; }
|
|
295
276
|
inline bool IsFailRecvMetadataOnDeadlineExceededEnabled() { return false; }
|
|
296
277
|
inline bool IsFreeLargeAllocatorEnabled() { return false; }
|
|
297
278
|
inline bool IsFuseFiltersEnabled() { return false; }
|
|
298
279
|
inline bool IsH2MaxDeallocatingStreamsHeadroomEnabled() { return false; }
|
|
299
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_HEADER_DATA_FRAME
|
|
300
|
-
inline bool IsHeaderDataFrameEnabled() { return true; }
|
|
301
280
|
#define GRPC_EXPERIMENT_IS_INCLUDED_INPROC_CANCEL_STREAM
|
|
302
281
|
inline bool IsInprocCancelStreamEnabled() { return true; }
|
|
303
282
|
inline bool IsKeepAlivePingTimerBatchEnabled() { return false; }
|
|
304
283
|
inline bool IsLocalConnectorSecureEnabled() { return false; }
|
|
305
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_MAX_INFLIGHT_PINGS_STRICT_LIMIT
|
|
306
|
-
inline bool IsMaxInflightPingsStrictLimitEnabled() { return true; }
|
|
307
284
|
inline bool IsMemoryOptimization01Enabled() { return false; }
|
|
308
285
|
inline bool IsMemoryOptimization02Enabled() { return false; }
|
|
309
|
-
|
|
310
|
-
inline bool IsMessageSizeRefactoringEnabled() { return true; }
|
|
286
|
+
inline bool IsMessageSizeRefactoringEnabled() { return false; }
|
|
311
287
|
inline bool IsMetadataOutstandingTokenRefactorEnabled() { return false; }
|
|
312
|
-
|
|
313
|
-
inline bool IsMetadataPublishToAppTagEnabled() { return true; }
|
|
288
|
+
inline bool IsMetadataPublishToAppTagEnabled() { return false; }
|
|
314
289
|
#define GRPC_EXPERIMENT_IS_INCLUDED_MONITORING_EXPERIMENT
|
|
315
290
|
inline bool IsMonitoringExperimentEnabled() { return true; }
|
|
316
291
|
inline bool IsMultipingEnabled() { return false; }
|
|
@@ -322,11 +297,12 @@ inline bool IsOptimization02Enabled() { return true; }
|
|
|
322
297
|
inline bool IsOptimization03Enabled() { return true; }
|
|
323
298
|
#define GRPC_EXPERIMENT_IS_INCLUDED_OPTIMIZATION_04
|
|
324
299
|
inline bool IsOptimization04Enabled() { return true; }
|
|
300
|
+
inline bool IsOptimization05Enabled() { return false; }
|
|
301
|
+
inline bool IsOptimization06Enabled() { return false; }
|
|
325
302
|
inline bool IsOtelExportTelemetryDomainsEnabled() { return false; }
|
|
326
303
|
inline bool IsPh2ClientEnabled() { return false; }
|
|
327
304
|
inline bool IsPh2ClientServerEnabled() { return false; }
|
|
328
|
-
|
|
329
|
-
inline bool IsPh2Perf01Enabled() { return true; }
|
|
305
|
+
inline bool IsPh2Perf01Enabled() { return false; }
|
|
330
306
|
inline bool IsPh2ServerEnabled() { return false; }
|
|
331
307
|
inline bool IsPickFirstIgnoreEmptyUpdatesEnabled() { return false; }
|
|
332
308
|
inline bool IsPipelinedReadSecureEndpointEnabled() { return false; }
|
|
@@ -337,15 +313,15 @@ inline bool IsPromiseBasedInprocTransportEnabled() { return false; }
|
|
|
337
313
|
inline bool IsPromiseBatchCleanupOnCancelEnabled() { return true; }
|
|
338
314
|
inline bool IsPromiseFilterSendCancelMetadataEnabled() { return false; }
|
|
339
315
|
inline bool IsRetryInCallv3Enabled() { return false; }
|
|
340
|
-
|
|
316
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_RETURN_PREEXISTING_ERRORS
|
|
317
|
+
inline bool IsReturnPreexistingErrorsEnabled() { return true; }
|
|
341
318
|
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
|
|
342
319
|
inline bool IsSecureEndpointOffloadLargeReadsEnabled() { return false; }
|
|
343
320
|
inline bool IsSecureEndpointOffloadLargeWritesEnabled() { return false; }
|
|
344
321
|
inline bool IsSecureEndpointReadCoalescingEnabled() { return false; }
|
|
345
322
|
inline bool IsSkipClearPeerOnCancellationEnabled() { return false; }
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
inline bool IsSubchannelWrapperCleanupOnOrphanEnabled() { return true; }
|
|
323
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_SUBCHANNEL_CONNECTION_SCALING
|
|
324
|
+
inline bool IsSubchannelConnectionScalingEnabled() { return true; }
|
|
349
325
|
inline bool IsTcpFrameSizeTuningEnabled() { return false; }
|
|
350
326
|
inline bool IsTcpRcvLowatEnabled() { return false; }
|
|
351
327
|
inline bool IsTsiFrameProtectorWithoutLocksEnabled() { return false; }
|
|
@@ -367,7 +343,6 @@ enum ExperimentIds {
|
|
|
367
343
|
kExperimentIdChaoticGoodFramingLayer,
|
|
368
344
|
kExperimentIdChaoticGoodSendSupportedFeatures,
|
|
369
345
|
kExperimentIdCustomFrameCheck,
|
|
370
|
-
kExperimentIdErrorFlatten,
|
|
371
346
|
kExperimentIdEventEngineClient,
|
|
372
347
|
kExperimentIdEventEngineDns,
|
|
373
348
|
kExperimentIdEventEngineDnsNonClientChannel,
|
|
@@ -375,16 +350,13 @@ enum ExperimentIds {
|
|
|
375
350
|
kExperimentIdEventEngineListener,
|
|
376
351
|
kExperimentIdEventEngineCallbackCq,
|
|
377
352
|
kExperimentIdEventEngineForAllOtherEndpoints,
|
|
378
|
-
kExperimentIdEventEnginePollerForPython,
|
|
379
353
|
kExperimentIdFailRecvMetadataOnDeadlineExceeded,
|
|
380
354
|
kExperimentIdFreeLargeAllocator,
|
|
381
355
|
kExperimentIdFuseFilters,
|
|
382
356
|
kExperimentIdH2MaxDeallocatingStreamsHeadroom,
|
|
383
|
-
kExperimentIdHeaderDataFrame,
|
|
384
357
|
kExperimentIdInprocCancelStream,
|
|
385
358
|
kExperimentIdKeepAlivePingTimerBatch,
|
|
386
359
|
kExperimentIdLocalConnectorSecure,
|
|
387
|
-
kExperimentIdMaxInflightPingsStrictLimit,
|
|
388
360
|
kExperimentIdMemoryOptimization01,
|
|
389
361
|
kExperimentIdMemoryOptimization02,
|
|
390
362
|
kExperimentIdMessageSizeRefactoring,
|
|
@@ -396,6 +368,8 @@ enum ExperimentIds {
|
|
|
396
368
|
kExperimentIdOptimization02,
|
|
397
369
|
kExperimentIdOptimization03,
|
|
398
370
|
kExperimentIdOptimization04,
|
|
371
|
+
kExperimentIdOptimization05,
|
|
372
|
+
kExperimentIdOptimization06,
|
|
399
373
|
kExperimentIdOtelExportTelemetryDomains,
|
|
400
374
|
kExperimentIdPh2Client,
|
|
401
375
|
kExperimentIdPh2ClientServer,
|
|
@@ -416,7 +390,6 @@ enum ExperimentIds {
|
|
|
416
390
|
kExperimentIdSecureEndpointReadCoalescing,
|
|
417
391
|
kExperimentIdSkipClearPeerOnCancellation,
|
|
418
392
|
kExperimentIdSubchannelConnectionScaling,
|
|
419
|
-
kExperimentIdSubchannelWrapperCleanupOnOrphan,
|
|
420
393
|
kExperimentIdTcpFrameSizeTuning,
|
|
421
394
|
kExperimentIdTcpRcvLowat,
|
|
422
395
|
kExperimentIdTsiFrameProtectorWithoutLocks,
|
|
@@ -462,10 +435,6 @@ inline bool IsChaoticGoodSendSupportedFeaturesEnabled() {
|
|
|
462
435
|
inline bool IsCustomFrameCheckEnabled() {
|
|
463
436
|
return IsExperimentEnabled<kExperimentIdCustomFrameCheck>();
|
|
464
437
|
}
|
|
465
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_ERROR_FLATTEN
|
|
466
|
-
inline bool IsErrorFlattenEnabled() {
|
|
467
|
-
return IsExperimentEnabled<kExperimentIdErrorFlatten>();
|
|
468
|
-
}
|
|
469
438
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_CLIENT
|
|
470
439
|
inline bool IsEventEngineClientEnabled() {
|
|
471
440
|
return IsExperimentEnabled<kExperimentIdEventEngineClient>();
|
|
@@ -494,10 +463,6 @@ inline bool IsEventEngineCallbackCqEnabled() {
|
|
|
494
463
|
inline bool IsEventEngineForAllOtherEndpointsEnabled() {
|
|
495
464
|
return IsExperimentEnabled<kExperimentIdEventEngineForAllOtherEndpoints>();
|
|
496
465
|
}
|
|
497
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_POLLER_FOR_PYTHON
|
|
498
|
-
inline bool IsEventEnginePollerForPythonEnabled() {
|
|
499
|
-
return IsExperimentEnabled<kExperimentIdEventEnginePollerForPython>();
|
|
500
|
-
}
|
|
501
466
|
#define GRPC_EXPERIMENT_IS_INCLUDED_FAIL_RECV_METADATA_ON_DEADLINE_EXCEEDED
|
|
502
467
|
inline bool IsFailRecvMetadataOnDeadlineExceededEnabled() {
|
|
503
468
|
return IsExperimentEnabled<kExperimentIdFailRecvMetadataOnDeadlineExceeded>();
|
|
@@ -514,10 +479,6 @@ inline bool IsFuseFiltersEnabled() {
|
|
|
514
479
|
inline bool IsH2MaxDeallocatingStreamsHeadroomEnabled() {
|
|
515
480
|
return IsExperimentEnabled<kExperimentIdH2MaxDeallocatingStreamsHeadroom>();
|
|
516
481
|
}
|
|
517
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_HEADER_DATA_FRAME
|
|
518
|
-
inline bool IsHeaderDataFrameEnabled() {
|
|
519
|
-
return IsExperimentEnabled<kExperimentIdHeaderDataFrame>();
|
|
520
|
-
}
|
|
521
482
|
#define GRPC_EXPERIMENT_IS_INCLUDED_INPROC_CANCEL_STREAM
|
|
522
483
|
inline bool IsInprocCancelStreamEnabled() {
|
|
523
484
|
return IsExperimentEnabled<kExperimentIdInprocCancelStream>();
|
|
@@ -530,10 +491,6 @@ inline bool IsKeepAlivePingTimerBatchEnabled() {
|
|
|
530
491
|
inline bool IsLocalConnectorSecureEnabled() {
|
|
531
492
|
return IsExperimentEnabled<kExperimentIdLocalConnectorSecure>();
|
|
532
493
|
}
|
|
533
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_MAX_INFLIGHT_PINGS_STRICT_LIMIT
|
|
534
|
-
inline bool IsMaxInflightPingsStrictLimitEnabled() {
|
|
535
|
-
return IsExperimentEnabled<kExperimentIdMaxInflightPingsStrictLimit>();
|
|
536
|
-
}
|
|
537
494
|
#define GRPC_EXPERIMENT_IS_INCLUDED_MEMORY_OPTIMIZATION_01
|
|
538
495
|
inline bool IsMemoryOptimization01Enabled() {
|
|
539
496
|
return IsExperimentEnabled<kExperimentIdMemoryOptimization01>();
|
|
@@ -578,6 +535,14 @@ inline bool IsOptimization03Enabled() {
|
|
|
578
535
|
inline bool IsOptimization04Enabled() {
|
|
579
536
|
return IsExperimentEnabled<kExperimentIdOptimization04>();
|
|
580
537
|
}
|
|
538
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_OPTIMIZATION_05
|
|
539
|
+
inline bool IsOptimization05Enabled() {
|
|
540
|
+
return IsExperimentEnabled<kExperimentIdOptimization05>();
|
|
541
|
+
}
|
|
542
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_OPTIMIZATION_06
|
|
543
|
+
inline bool IsOptimization06Enabled() {
|
|
544
|
+
return IsExperimentEnabled<kExperimentIdOptimization06>();
|
|
545
|
+
}
|
|
581
546
|
#define GRPC_EXPERIMENT_IS_INCLUDED_OTEL_EXPORT_TELEMETRY_DOMAINS
|
|
582
547
|
inline bool IsOtelExportTelemetryDomainsEnabled() {
|
|
583
548
|
return IsExperimentEnabled<kExperimentIdOtelExportTelemetryDomains>();
|
|
@@ -658,10 +623,6 @@ inline bool IsSkipClearPeerOnCancellationEnabled() {
|
|
|
658
623
|
inline bool IsSubchannelConnectionScalingEnabled() {
|
|
659
624
|
return IsExperimentEnabled<kExperimentIdSubchannelConnectionScaling>();
|
|
660
625
|
}
|
|
661
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_SUBCHANNEL_WRAPPER_CLEANUP_ON_ORPHAN
|
|
662
|
-
inline bool IsSubchannelWrapperCleanupOnOrphanEnabled() {
|
|
663
|
-
return IsExperimentEnabled<kExperimentIdSubchannelWrapperCleanupOnOrphan>();
|
|
664
|
-
}
|
|
665
626
|
#define GRPC_EXPERIMENT_IS_INCLUDED_TCP_FRAME_SIZE_TUNING
|
|
666
627
|
inline bool IsTcpFrameSizeTuningEnabled() {
|
|
667
628
|
return IsExperimentEnabled<kExperimentIdTcpFrameSizeTuning>();
|
data/src/core/lib/iomgr/error.cc
CHANGED
|
@@ -110,11 +110,6 @@ absl::Status grpc_wsa_error(const grpc_core::DebugLocation& location, int err,
|
|
|
110
110
|
grpc_error_handle grpc_error_set_int(grpc_error_handle src,
|
|
111
111
|
grpc_core::StatusIntProperty which,
|
|
112
112
|
intptr_t value) {
|
|
113
|
-
if (!grpc_core::IsErrorFlattenEnabled() && src.ok()) {
|
|
114
|
-
src = absl::UnknownError("");
|
|
115
|
-
StatusSetInt(&src, grpc_core::StatusIntProperty::kRpcStatus,
|
|
116
|
-
GRPC_STATUS_OK);
|
|
117
|
-
}
|
|
118
113
|
grpc_core::StatusSetInt(&src, which, value);
|
|
119
114
|
return src;
|
|
120
115
|
}
|
|
@@ -125,79 +120,14 @@ bool grpc_error_get_int(grpc_error_handle error,
|
|
|
125
120
|
if (value.has_value()) {
|
|
126
121
|
*p = *value;
|
|
127
122
|
return true;
|
|
128
|
-
} else {
|
|
129
|
-
// TODO(veblush): Remove this once absl::Status migration is done
|
|
130
|
-
if (!grpc_core::IsErrorFlattenEnabled() &&
|
|
131
|
-
which == grpc_core::StatusIntProperty::kRpcStatus) {
|
|
132
|
-
switch (error.code()) {
|
|
133
|
-
case absl::StatusCode::kOk:
|
|
134
|
-
*p = GRPC_STATUS_OK;
|
|
135
|
-
return true;
|
|
136
|
-
case absl::StatusCode::kResourceExhausted:
|
|
137
|
-
*p = GRPC_STATUS_RESOURCE_EXHAUSTED;
|
|
138
|
-
return true;
|
|
139
|
-
case absl::StatusCode::kCancelled:
|
|
140
|
-
*p = GRPC_STATUS_CANCELLED;
|
|
141
|
-
return true;
|
|
142
|
-
default:
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
return false;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
grpc_error_handle grpc_error_set_str(grpc_error_handle src,
|
|
151
|
-
grpc_core::StatusStrProperty which,
|
|
152
|
-
absl::string_view str) {
|
|
153
|
-
if (!grpc_core::IsErrorFlattenEnabled() && src.ok()) {
|
|
154
|
-
src = absl::UnknownError("");
|
|
155
|
-
StatusSetInt(&src, grpc_core::StatusIntProperty::kRpcStatus,
|
|
156
|
-
GRPC_STATUS_OK);
|
|
157
|
-
}
|
|
158
|
-
grpc_core::StatusSetStr(&src, which, str);
|
|
159
|
-
return src;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
bool grpc_error_get_str(grpc_error_handle error,
|
|
163
|
-
grpc_core::StatusStrProperty which, std::string* s) {
|
|
164
|
-
std::optional<std::string> value = grpc_core::StatusGetStr(error, which);
|
|
165
|
-
if (value.has_value()) {
|
|
166
|
-
*s = std::move(*value);
|
|
167
|
-
return true;
|
|
168
|
-
} else {
|
|
169
|
-
// TODO(veblush): Remove this once absl::Status migration is done
|
|
170
|
-
if (!grpc_core::IsErrorFlattenEnabled() &&
|
|
171
|
-
which == grpc_core::StatusStrProperty::kGrpcMessage) {
|
|
172
|
-
switch (error.code()) {
|
|
173
|
-
case absl::StatusCode::kOk:
|
|
174
|
-
*s = "";
|
|
175
|
-
return true;
|
|
176
|
-
case absl::StatusCode::kCancelled:
|
|
177
|
-
*s = "CANCELLED";
|
|
178
|
-
return true;
|
|
179
|
-
default:
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
return false;
|
|
184
123
|
}
|
|
124
|
+
return false;
|
|
185
125
|
}
|
|
186
126
|
|
|
187
127
|
grpc_error_handle grpc_error_add_child(grpc_error_handle src,
|
|
188
128
|
grpc_error_handle child) {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
return src;
|
|
192
|
-
}
|
|
193
|
-
if (src.ok()) {
|
|
194
|
-
return child;
|
|
195
|
-
} else {
|
|
196
|
-
if (!child.ok()) {
|
|
197
|
-
grpc_core::StatusAddChild(&src, child);
|
|
198
|
-
}
|
|
199
|
-
return src;
|
|
200
|
-
}
|
|
129
|
+
grpc_core::StatusAddChild(&src, child);
|
|
130
|
+
return src;
|
|
201
131
|
}
|
|
202
132
|
|
|
203
133
|
bool grpc_log_error(const char* what, grpc_error_handle error, const char* file,
|
data/src/core/lib/iomgr/error.h
CHANGED
|
@@ -19,6 +19,14 @@
|
|
|
19
19
|
#ifndef GRPC_SRC_CORE_LIB_IOMGR_ERROR_H
|
|
20
20
|
#define GRPC_SRC_CORE_LIB_IOMGR_ERROR_H
|
|
21
21
|
|
|
22
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
23
|
+
//
|
|
24
|
+
// ALL APIs IN THIS FILE ARE DEPRECATED!
|
|
25
|
+
//
|
|
26
|
+
// Callers should instead use absl::Status APIs directly.
|
|
27
|
+
//
|
|
28
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
29
|
+
|
|
22
30
|
#include <grpc/slice.h>
|
|
23
31
|
#include <grpc/status.h>
|
|
24
32
|
#include <grpc/support/port_platform.h>
|
|
@@ -94,12 +102,6 @@ grpc_error_handle grpc_error_set_int(grpc_error_handle src,
|
|
|
94
102
|
/// intptr_t for `p`, even if the value of `p` is not used.
|
|
95
103
|
bool grpc_error_get_int(grpc_error_handle error,
|
|
96
104
|
grpc_core::StatusIntProperty which, intptr_t* p);
|
|
97
|
-
grpc_error_handle grpc_error_set_str(grpc_error_handle src,
|
|
98
|
-
grpc_core::StatusStrProperty which,
|
|
99
|
-
absl::string_view str);
|
|
100
|
-
/// Returns false if the specified string is not set.
|
|
101
|
-
bool grpc_error_get_str(grpc_error_handle error,
|
|
102
|
-
grpc_core::StatusStrProperty which, std::string* str);
|
|
103
105
|
|
|
104
106
|
/// Add a child error: an error that is believed to have contributed to this
|
|
105
107
|
/// error occurring. Allows root causing high level errors from lower level
|
|
@@ -46,7 +46,6 @@ grpc_error_handle grpc_error_create_from_cferror(const char* file, int line,
|
|
|
46
46
|
absl::StrFormat("%s (error domain:%s, code:%ld, description:%s)",
|
|
47
47
|
custom_desc, buf_domain, code, buf_desc);
|
|
48
48
|
CFRelease(desc);
|
|
49
|
-
return
|
|
50
|
-
grpc_core::DebugLocation(file, line), {});
|
|
49
|
+
return absl::UnknownError(error_msg);
|
|
51
50
|
}
|
|
52
51
|
#endif // GRPC_CFSTREAM
|
|
@@ -334,9 +334,7 @@ static void fork_fd_list_remove_grpc_fd(grpc_fd* fd) {
|
|
|
334
334
|
|
|
335
335
|
static grpc_fd* fd_create(int fd, const char* name, bool track_err) {
|
|
336
336
|
grpc_fd* new_fd = nullptr;
|
|
337
|
-
if (grpc_core::IsEventEngineForAllOtherEndpointsEnabled()
|
|
338
|
-
!grpc_event_engine::experimental::
|
|
339
|
-
EventEngineExperimentDisabledForPython()) {
|
|
337
|
+
if (grpc_core::IsEventEngineForAllOtherEndpointsEnabled()) {
|
|
340
338
|
grpc_fd* new_fd = static_cast<grpc_fd*>(gpr_malloc(sizeof(grpc_fd)));
|
|
341
339
|
new_fd->fd = fd;
|
|
342
340
|
return new_fd;
|
|
@@ -418,9 +416,7 @@ static void fd_shutdown(grpc_fd* fd, grpc_error_handle why) {
|
|
|
418
416
|
|
|
419
417
|
static void fd_orphan(grpc_fd* fd, grpc_closure* on_done, int* release_fd,
|
|
420
418
|
const char* reason) {
|
|
421
|
-
if (grpc_core::IsEventEngineForAllOtherEndpointsEnabled()
|
|
422
|
-
!grpc_event_engine::experimental::
|
|
423
|
-
EventEngineExperimentDisabledForPython()) {
|
|
419
|
+
if (grpc_core::IsEventEngineForAllOtherEndpointsEnabled()) {
|
|
424
420
|
GRPC_CHECK_NE(release_fd, nullptr);
|
|
425
421
|
GRPC_CHECK_EQ(on_done, nullptr);
|
|
426
422
|
*release_fd = fd->fd;
|
|
@@ -379,9 +379,7 @@ static void unref_by(grpc_fd* fd, int n) {
|
|
|
379
379
|
}
|
|
380
380
|
|
|
381
381
|
static grpc_fd* fd_create(int fd, const char* name, bool track_err) {
|
|
382
|
-
if (grpc_core::IsEventEngineForAllOtherEndpointsEnabled()
|
|
383
|
-
!grpc_event_engine::experimental::
|
|
384
|
-
EventEngineExperimentDisabledForPython()) {
|
|
382
|
+
if (grpc_core::IsEventEngineForAllOtherEndpointsEnabled()) {
|
|
385
383
|
GRPC_TRACE_LOG(event_engine, ERROR)
|
|
386
384
|
<< "Creating a wrapped EventEngine grpc_fd with fd:" << fd;
|
|
387
385
|
grpc_fd* new_fd = static_cast<grpc_fd*>(gpr_malloc(sizeof(grpc_fd)));
|
|
@@ -480,9 +478,7 @@ static int fd_wrapped_fd(grpc_fd* fd) {
|
|
|
480
478
|
|
|
481
479
|
static void fd_orphan(grpc_fd* fd, grpc_closure* on_done, int* release_fd,
|
|
482
480
|
const char* reason) {
|
|
483
|
-
if (grpc_core::IsEventEngineForAllOtherEndpointsEnabled()
|
|
484
|
-
!grpc_event_engine::experimental::
|
|
485
|
-
EventEngineExperimentDisabledForPython()) {
|
|
481
|
+
if (grpc_core::IsEventEngineForAllOtherEndpointsEnabled()) {
|
|
486
482
|
GRPC_CHECK_NE(release_fd, nullptr);
|
|
487
483
|
GRPC_CHECK_EQ(on_done, nullptr);
|
|
488
484
|
*release_fd = fd->fd;
|
|
@@ -1926,9 +1926,7 @@ static const grpc_endpoint_vtable vtable = {tcp_read,
|
|
|
1926
1926
|
grpc_endpoint* grpc_tcp_create(
|
|
1927
1927
|
grpc_fd* fd, const grpc_event_engine::experimental::EndpointConfig& config,
|
|
1928
1928
|
absl::string_view peer_string) {
|
|
1929
|
-
if (grpc_core::IsEventEngineForAllOtherEndpointsEnabled()
|
|
1930
|
-
!grpc_event_engine::experimental::
|
|
1931
|
-
EventEngineExperimentDisabledForPython()) {
|
|
1929
|
+
if (grpc_core::IsEventEngineForAllOtherEndpointsEnabled()) {
|
|
1932
1930
|
// Create an EventEngine endpoint when creating the transport.
|
|
1933
1931
|
auto* engine =
|
|
1934
1932
|
reinterpret_cast<grpc_event_engine::experimental::EventEngine*>(
|
|
@@ -1956,9 +1954,7 @@ grpc_endpoint* grpc_tcp_create(grpc_fd* em_fd,
|
|
|
1956
1954
|
GRPC_CHECK(!grpc_event_engine::experimental::UsePollsetAlternative())
|
|
1957
1955
|
<< "This function must not be called when the pollset_alternative "
|
|
1958
1956
|
"experiment is enabled. This is a bug.";
|
|
1959
|
-
GRPC_CHECK(
|
|
1960
|
-
!grpc_core::IsEventEngineForAllOtherEndpointsEnabled() ||
|
|
1961
|
-
grpc_event_engine::experimental::EventEngineExperimentDisabledForPython())
|
|
1957
|
+
GRPC_CHECK(!grpc_core::IsEventEngineForAllOtherEndpointsEnabled())
|
|
1962
1958
|
<< "The event_engine_for_all_other_endpoints experiment should prevent "
|
|
1963
1959
|
"this method from being called. This is a bug.";
|
|
1964
1960
|
grpc_tcp* tcp = new grpc_tcp(options);
|
|
@@ -62,7 +62,7 @@ bool AuditLoggerRegistry::FactoryExists(absl::string_view name) {
|
|
|
62
62
|
registry->logger_factories_map_.end();
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
absl::StatusOr<std::
|
|
65
|
+
absl::StatusOr<std::shared_ptr<const AuditLoggerFactory::Config>>
|
|
66
66
|
AuditLoggerRegistry::ParseConfig(absl::string_view name, const Json& json) {
|
|
67
67
|
MutexLock lock(mu);
|
|
68
68
|
auto it = registry->logger_factories_map_.find(name);
|
|
@@ -74,7 +74,7 @@ AuditLoggerRegistry::ParseConfig(absl::string_view name, const Json& json) {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
std::unique_ptr<AuditLogger> AuditLoggerRegistry::CreateAuditLogger(
|
|
77
|
-
std::
|
|
77
|
+
std::shared_ptr<const AuditLoggerFactory::Config> config) {
|
|
78
78
|
MutexLock lock(mu);
|
|
79
79
|
auto it = registry->logger_factories_map_.find(config->name());
|
|
80
80
|
GRPC_CHECK(it != registry->logger_factories_map_.end());
|
|
@@ -36,17 +36,17 @@ namespace experimental {
|
|
|
36
36
|
|
|
37
37
|
class AuditLoggerRegistry {
|
|
38
38
|
public:
|
|
39
|
-
static void RegisterFactory(std::unique_ptr<AuditLoggerFactory>);
|
|
39
|
+
static void RegisterFactory(std::unique_ptr<AuditLoggerFactory> factory);
|
|
40
40
|
|
|
41
41
|
static bool FactoryExists(absl::string_view name);
|
|
42
42
|
|
|
43
|
-
static absl::StatusOr<std::
|
|
43
|
+
static absl::StatusOr<std::shared_ptr<const AuditLoggerFactory::Config>>
|
|
44
44
|
ParseConfig(absl::string_view name, const Json& json);
|
|
45
45
|
|
|
46
46
|
// This assume the given config is parsed and validated already.
|
|
47
47
|
// Therefore, it should always succeed in creating a logger.
|
|
48
48
|
static std::unique_ptr<AuditLogger> CreateAuditLogger(
|
|
49
|
-
std::
|
|
49
|
+
std::shared_ptr<const AuditLoggerFactory::Config> config);
|
|
50
50
|
|
|
51
51
|
// Factories are registered during initialization. They should never be
|
|
52
52
|
// unregistered since they will be looked up at any time till the program
|
|
@@ -44,20 +44,18 @@ bool ShouldLog(const Decision& decision,
|
|
|
44
44
|
|
|
45
45
|
} // namespace
|
|
46
46
|
|
|
47
|
-
GrpcAuthorizationEngine::GrpcAuthorizationEngine(Rbac
|
|
48
|
-
: name_(
|
|
49
|
-
action_(
|
|
50
|
-
audit_condition_(
|
|
51
|
-
for (auto&
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
std::
|
|
56
|
-
policies_.push_back(std::move(policy));
|
|
47
|
+
GrpcAuthorizationEngine::GrpcAuthorizationEngine(const Rbac& rbac)
|
|
48
|
+
: name_(rbac.name),
|
|
49
|
+
action_(rbac.action),
|
|
50
|
+
audit_condition_(rbac.audit_condition) {
|
|
51
|
+
for (auto& [name, policy] : rbac.policies) {
|
|
52
|
+
auto& engine_policy = policies_.emplace_back();
|
|
53
|
+
engine_policy.name = name;
|
|
54
|
+
engine_policy.matcher =
|
|
55
|
+
std::make_unique<PolicyAuthorizationMatcher>(policy);
|
|
57
56
|
}
|
|
58
|
-
for (auto& logger_config :
|
|
59
|
-
auto logger =
|
|
60
|
-
AuditLoggerRegistry::CreateAuditLogger(std::move(logger_config));
|
|
57
|
+
for (const auto& logger_config : rbac.logger_configs) {
|
|
58
|
+
auto logger = AuditLoggerRegistry::CreateAuditLogger(logger_config);
|
|
61
59
|
GRPC_CHECK(logger != nullptr);
|
|
62
60
|
audit_loggers_.push_back(std::move(logger));
|
|
63
61
|
}
|
|
@@ -44,7 +44,7 @@ class GrpcAuthorizationEngine : public AuthorizationEngine {
|
|
|
44
44
|
explicit GrpcAuthorizationEngine(Rbac::Action action)
|
|
45
45
|
: action_(action), audit_condition_(Rbac::AuditCondition::kNone) {}
|
|
46
46
|
// Builds GrpcAuthorizationEngine with allow/deny RBAC policy.
|
|
47
|
-
explicit GrpcAuthorizationEngine(Rbac
|
|
47
|
+
explicit GrpcAuthorizationEngine(const Rbac& rbac);
|
|
48
48
|
|
|
49
49
|
GrpcAuthorizationEngine(GrpcAuthorizationEngine&& other) noexcept;
|
|
50
50
|
GrpcAuthorizationEngine& operator=(GrpcAuthorizationEngine&& other) noexcept;
|