Commit Graph

1675 Commits

Author SHA1 Message Date
Karthik Ravi Shankar 939830aa15
Merge pull request #20030 from karthikravis/move-method-handler
Make MethodHandler and related interfaces generic
2019-09-10 21:45:08 -07:00
Esun Kim cf444b9cab Regenerate projects 2019-09-10 14:08:50 -07:00
Karthik Ravi Shankar 7ec1a9663d Merge branch 'master' into move-method-handler 2019-09-06 12:21:29 -07:00
Yash Tibrewal 97f1f57dab Allow call credentials to be set even after the call is created but before initial metadata is sent 2019-09-05 18:13:59 -07:00
Vijay Pai 7235091dc2 Don't start AuthMetadataProcessor threadpool for non-blocking processor 2019-09-05 10:41:32 -07:00
Karthik Ravi Shankar ce29926334 Merge branch 'master' into move-method-handler 2019-09-03 08:08:18 -07:00
Yash Tibrewal afadd42297
Merge pull request #20058 from yashykt/createchannelbadcreds
Init needs to be called in case of bad creds
2019-08-28 18:14:52 -07:00
Karthik Ravi Shankar de2006d3e1 Merge branch 'master' into move-method-handler 2019-08-28 14:01:58 -07:00
Vijay Pai 5bf8760d3c
Merge pull request #19957 from g-easy/tags
Use opencensus::tags::TagKey.
2019-08-28 06:16:50 -07:00
Juanli Shen 4dffd82524 Fix type unmatch 2019-08-24 11:57:57 -07:00
Yash Tibrewal 5294f49d11 Init needs to be called in case of bad creds 2019-08-23 15:34:57 -07:00
Karthik Ravi Shankar 28b0671235 Make MethodHandler and related interfaces generic 2019-08-21 16:12:48 -07:00
easy 6bca0f04a3 Use opencensus::tags::TagKey.
opencensus::stats::TagKey is deprecated.
2019-08-16 19:14:09 +10:00
Arjun Roy 6cf05561ce Added overloads for metadata add/remove operations when static index is known.
In several cases, we wish to add or remove metadata when we already know what
kind of metadata it is (e.g. we know we're dealing with the path, or the
authority, or the user agent, etc.).

In these cases, we do not need to re-compute the metadata batch callout index
since we know it a-priori. This saves us some branches and ALU ops spent
pointlessly re-computing these indices in several hot-path filters.

We do need the original methods where we do compute the indices in cases where
we're operating over a collection of metadata, but this is relatively uncommon.
2019-08-14 10:51:59 -07:00
Esun Kim f7454a9876 Modified health_check to use upb proto instead of nanopb 2019-08-07 09:16:08 -07:00
Karthik Ravi Shankar fcb43f9dee Regenerate projects 2019-08-01 17:34:02 -07:00
Arjun Roy 557446a11e Added specializations for grpc_mdelem_create.
In several cases, we create grpc mdelem structures using known-static
metadata inputs. Furthermore, in several cases we create a slice on
the heap (e.g. grpc_slice_from_copied_buffer) where we know we are
transferring refcount ownership. In several cases, then, we can:

1) Avoid unnecessary ref/unref operations that are no-ops (for static
   slices) or superfluous (if we're transferring ownership).
2) Avoid unnecessarily comprehensive calls to grpc_slice_eq (since
   they'd only be called with static or interned slice arguments,
   which by construction would have equal refcounts if they were
   in fact equal.
3) Avoid unnecessary checks to see if a slice is interned (when we
   know that they are).

To avoid polluting the internal API, we introduce the notion of
strongly-typed grpc_slice objects. We draw a distinction between
Internal (interned and static-storage) slices and Extern (inline and
non-statically allocated). We introduce overloads to
grpc_mdelem_create() and grpc_mdelem_from_slices() for the fastpath
cases identified above based on these slice types.

From the programmer's point of view, though, nothing changes - they
need only use grpc_mdelem_create() and grpc_mdelem_from_slices() as
before, and the appropriate fastpath will be picked based on type
inference. If no special knowledge exists for the slice type (i.e. we
pass in generic grpc_slice objects), the slowpath method will still
always return correct behaviour.

This is good for:
- Roughly 1-3% reduction in CPU time for several unary/streaming
  ping pong fullstack microbenchmarks.
- Reduction of about 15-20% in CPU time for some hpack parser
  microbenchmarks.
- 10-12% reduction of CPU time for metadata microbenchmarks involving
  interned slice comparisons.
2019-07-30 17:07:44 -07:00
Prashant Jaikumar 232725b99a Add C++ Cronet end2end tests 2019-07-29 10:48:35 -07:00
yang-g 5779dd935a Qualify the error code with StatusCode:: 2019-07-10 13:52:31 -07:00
Julien Boeuf 109edca971 Adding C++ API and implementation for STS credentials:
- marked as experimental.
- also changed the name of a field in the options struct.
2019-07-09 22:28:44 -07:00
Moiz Haidry bf994e48d9 Move grpc async, callback and sync implementation to grpc_impl namespace 2019-07-01 14:05:54 -07:00
Moiz Haidry 63083d4472 Code cleanup 2019-06-21 11:19:34 -07:00
Moiz Haidry 3ce20819cf Modify codegen to use grpc_impl namespace and other cleanups 2019-06-21 10:51:57 -07:00
Esun Kim cd27a36924 Regenerate projects 2019-06-18 15:40:50 -07:00
Moiz Haidry 186875337c Sync with master 2019-06-11 16:16:27 -07:00
Karthik Ravi Shankar e4b992ee48 Merge branch 'master' into migrate-client-context 2019-06-10 14:01:28 -07:00
Yash Tibrewal 6ed651356d Fix typo 2019-06-07 16:28:31 -07:00
Karthik Ravi Shankar 522ddfe273 Move ClientContext to grpc_impl
ClientContext is another file which needs to be moved from grpc to
grpc_impl for referencing it.
2019-06-05 16:31:39 -07:00
Moiz Haidry 226e63dd0c Move server context implementation to grpc_impl namespace and typedef the ref to it 2019-06-05 10:41:30 -07:00
yang-g c156653997 Add listner fd as part of the external connection parameters 2019-06-03 10:38:37 -07:00
Yang Gao 07c9f7a36b
Merge pull request #19139 from yang-g/plugin_creds
Avoid accessing freed auth_metadata_context in C++ plugin.
2019-05-31 14:35:52 -07:00
yang-g a874fd8bbb Resolve review comments 2019-05-30 15:20:10 -07:00
Srini Polavarapu d80650db31
Merge pull request #19143 from weiyongji/master
typo fix
2019-05-29 21:36:22 -07:00
yang-g bd97b1361d Delete wrapper in executor thread to avoid self-joining deadlock 2019-05-29 13:30:28 -07:00
yang-g 47dbf1dd26 Second approach 2019-05-28 23:47:29 -07:00
Yash Tibrewal 3893a6379b Clean up 2019-05-28 11:57:57 -07:00
weiyongji 57cc401597 typo fix 2019-05-25 11:20:08 +08:00
Yash Tibrewal 4746a8734d Merge branch 'master' into validatesvccfg 2019-05-24 15:27:16 -07:00
Yash Tibrewal 886dc10daa Move validate_service_config to a new file 2019-05-24 14:29:16 -07:00
Karthik Ravi Shankar dc9897dfe3
Merge pull request #19067 from karthikravis/channel-cq-scq-impl
Fold Channel and CompletionQueue into grpc_impl
2019-05-22 16:10:58 -07:00
Yash Tibrewal 41ae267107 Remove unnecessary header 2019-05-20 11:46:18 -07:00
Yash Tibrewal f63dde8e8e Make validation function a global function 2019-05-20 11:45:07 -07:00
Vijay Pai 570bf332bc
Memset in channel_filter ctor not needed
and causes compiler warnings. Thanks to @KeithMoyer  in #19044 and @soheilhy
2019-05-17 10:27:18 -07:00
Karthik Ravi Shankar 03b079499c Move CompletionQueue and Channel 2019-05-17 09:16:32 -07:00
Karthik Ravi Shankar 40210d3b8a Move Channel to grpc_impl 2019-05-17 09:12:33 -07:00
yang-g c639da7a1d Merge branch 'master' of https://github.com/grpc/grpc into port_sharing 2019-05-16 09:07:55 -07:00
yang-g ec6e7fd941 Rename enum 2019-05-16 09:07:34 -07:00
Karthik Ravi Shankar 3996599392 Fix clang script errors 2019-05-15 14:30:33 -07:00
Karthik Ravi Shankar 772a74aced Revert changes to Channel 2019-05-15 14:24:17 -07:00
Karthik Ravi Shankar 6be0b06c69
Revert "Fold CompletionQueue and ServerCompletionQueue into grpc_impl" 2019-05-15 13:38:34 -07:00