Commit Graph

4043 Commits

Author SHA1 Message Date
Craig Tiller 46afdf9989
Add test and mitigation for clang 11 compiler bug (#27073)
* Add test and mitigation for clang 11 compiler bug

* document

* document

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-22 22:35:51 -07:00
AJ Heller d10617edb5
Move resource_user ownership into chttp2 transport/server/connector v2 (#27032)
Reintroducing PR #26643, which was reverted in #27029

Fixed a memory leak and added a test that would have caught it (ASAN build): ca0c8c4
2021-08-18 17:04:00 -07:00
Craig Tiller 4dff0ee48a
Fix bug in CQNext (#27022)
Internal bug b/170934515

In some cases, calling CQ::Next will return true without passing up a
new tag value, which is very much illegal. My expectation is that this
is due to messing up between SHUTDOWN and TIMEOUT in lower layer code
that doesn't particularly matter much to most callers, but was being
erroneously checked here.
2021-08-17 10:50:10 -07:00
Craig Tiller f5d3ed2db1
Revert "Move resource_user ownership into chttp2 transport/server/connector (#26643)" (#27029)
This reverts commit d1935a65a1. Will be rolled forward with a fix.
2021-08-16 19:07:39 -07:00
AJ Heller d1935a65a1
Move resource_user ownership into chttp2 transport/server/connector (#26643) 2021-08-16 13:50:56 -07:00
Zhongxian Pan 3340f35d71
Remove useless grpc_alarm declaration in grpc_types.h (#26991) 2021-08-13 04:43:54 -07:00
Tamir Duberstein 96fb5d4482
Remove GPR_*_TLS macros except PTHREAD (#26974)
Use c++11 thread_local when GPR_PTHREAD_TLS isn't defined.
2021-08-12 06:45:34 -07:00
Tamir Duberstein ea3ac74004
Use stdcpp TLS on Fuchsia (#26936)
There seems to be no reason this was using pthread apart from
GPR_STDCPP_TLS not yet existing when the Fuchsia configs were created in
https://fuchsia.googlesource.com/third_party/grpc/+/2dbaf2a.
2021-08-07 14:33:58 -07:00
Yash Tibrewal 29d220a0ef
Re-experimentalize XdsServerBuilder (#26892)
* Re-experimentalize XdsServerBuilder

* Fix compiler issue
2021-08-06 10:29:28 -07:00
Tamir Duberstein 013e67a029
Deprecate grpc{_core,::internal}::WaitUntil (#26866)
It is not possible for such a function to be implemented in a way that
is understood by annotalysis. Mark it deprecated and replace instances
of its use with direct mutex/condvar usage.

Add a bunch of missing thread safety annotations while I'm here.
2021-08-04 17:03:25 -07:00
Mark D. Roth d140f14caf
Enable retries by default (#26766)
* Enable retries by default, but add a separate arg for hedging.

* don't need to explicitly enable retries in xDS config selector

* clang-format

* don't need retry_enabled bit anymore

* fix HTTP client filter to restore the send_message op in the batch

* fix retry cancellation when a batch fails on call attempt

* fix clang-tidy

* fix client channel to pass down batches even after cancellation

* fix retry code to pass transport stats back up to the surface

* add some missing payload propagation

* fix retry handling of callbacks for pending batches

* avoid scheduling the same callback twice

* fix some trace messages

* don't avoid starting recv_initial_metadata or recv_message due to recv_trailing_metadata already being started internally

* avoid restarting recv_trailing_metadata after commit if we've already started it internally

* use fast path when retries are not configured
2021-08-02 15:23:30 -07:00
Esun Kim 931f91b745
Changed GRPCPP_ABSEIL_SYNC to GPR_ABSEIL_SYNC (#25681) 2021-08-02 12:18:21 -07:00
Mark D. Roth fbd5e9f2ed
add separate channel arg to enable hedging (#26838)
* add separate channel arg to enable hedging

* revert change to retry_disabled test
2021-08-02 10:07:51 -07:00
AJ Heller a10a5bf655
Changes from feedback on gRFC L82: gRPC Core EventEngine API (#26733) 2021-07-21 13:27:04 -07:00
Craig Tiller 66babfd746
Use C++ attribute detection (#26721) 2021-07-19 15:32:35 -07:00
yihuaz b9a69481c2
Revert "Support user provided "scope" in JWT and GDC (#26577)" (#26645)
This reverts commit 6df967966b.
2021-07-09 15:05:34 -07:00
Rainer Schoenberger ede7923116
Fix ABNF grammar formatting in doxygen documentation (#26467) 2021-07-07 17:50:44 -07:00
Vijay Pai ae0516fece
Remove some EXPERIMENTAL comments (#26618)
* Remove some EXPERIMENTAL comments

* Update server_interface.h
2021-07-07 14:25:42 -07:00
Yash Tibrewal 4daedf0233
De-experimentalize XdsServerBuilder (#26543) 2021-07-02 19:33:15 -07:00
yihuaz 6df967966b
Support user provided "scope" in JWT and GDC (#26577)
* support scope overriding in jwt and gdc

* fix formatting

* fix bazel build issue

* fix clang tidy
2021-07-01 10:26:33 -07:00
Vijay Pai 3e19babc1e
Remove all possible traces of grpc::experimental for callback API (#26584) 2021-06-30 19:55:08 -07:00
itsemmanuelfrancis 471df71003
removing grpc_metadata::flags, improving GRPC_INITIAL_METADATA_* comments (#26562) 2021-06-30 12:03:29 -07:00
Vijay Pai 0b65c34ae5
De-experimentalize default_reactor_test_peer.h and last uses of CallbackServerContext (plus namespace cleanup) (#26569)
* De-experimentalize default_reactor_test_peer.h (plus namespace cleanup)

* Remove experimental refs to callback API in server_context.h
2021-06-29 12:24:09 -07:00
Vijay Pai 8f0dc6946c
Remove last ref to grpc_experimental_completion_queue_functor (#26568) 2021-06-28 16:44:52 -07:00
Vijay Pai ea4b68e7a1
Drop experimental tags from core callback API (#26535) 2021-06-24 17:20:43 -07:00
Craig Tiller 03bdfa4a74
Make socket mutators work for server connections (#26328)
* Make socket mutators work for server connections

* compile fix

* compile fix

* compile fix

* compile fix

* cleanup

* Revert "cleanup"

This reverts commit 480fcc600a.

* Revert "Revert "cleanup""

This reverts commit 29fbc349d2.
2021-06-23 14:40:35 -07:00
yihuaz 932dbed49d
Revert "Allow to specify user provided audience in google default credentials and JWT credentials (#26456)" (#26531)
This reverts commit 5a91a513fd.
2021-06-22 16:30:30 -07:00
Vijay Pai cf1ebf7387
Remove experimental tag from uses of the C++ callback API (#26495) 2021-06-20 00:47:07 -07:00
AJ Heller 25d91e3091
New iomgr implementation backed by the EventEngine API (#26026)
This code adds an iomgr implementation that's backed by an EventEngine. This uses the EventEngine API alone, and separate work will introduce an EventEngine prototype to plug into it.

See also drfloob#1: @nicolasnoble has a pull request against this branch, implementing the libuv-based EventEngine. One goal here is to implement the iomgr code such that it can be merged independently without affecting normal builds.

This implementation can be built using bazel build --cxxopt='-DGRPC_USE_EVENT_ENGINE' :all

Some shortcuts are being taken to get a working, testable version of the engine. EventEngines are not pluggable, for example.
2021-06-18 12:30:09 -07:00
ZhenLian 5a91a513fd
Allow to specify user provided audience in google default credentials and JWT credentials (#26456)
* support user provided audience in gdc and jwt
2021-06-11 09:44:46 -07:00
Tom Ward 0a97253cc2
Add MockServer{Reader|Writer} to enable mocking server streams. (#26429) 2021-06-08 11:15:32 -07:00
Esun Kim eec81014d8
Revert "async_unary_call: add a Destroy method, called by std::default_delete. (#26389)" (#26449)
This reverts commit b3b036ca17.
2021-06-08 10:29:44 -07:00
Lidi Zheng a3ae8e00a2
Revert "Allow to specify user provided audience in google default credentials and JWT credentials (#26392)" (#26440)
This reverts commit 304262e135.
2021-06-07 15:24:54 -07:00
Aaron Jacobs b3b036ca17
async_unary_call: add a Destroy method, called by std::default_delete. (#26389)
This implements gRFC L80:

    https://github.com/grpc/proposal/blob/a3a0e23b/L80-cpp-async-response-reader-destruction.md
2021-06-07 09:02:08 +02:00
Ashitha Santhosh b9a643a817
Static policy provider implementation. (#26134) 2021-06-03 23:18:08 -07:00
yihuaz 304262e135
Allow to specify user provided audience in google default credentials and JWT credentials (#26392)
* support user provided audience in gdc and jwt

* fix 1st round of comments

* fix ruby and php to use new GDC API

* fix python clang issue

* address 2nd round of comments

* fix string_view issue

* remove length param in string_view constructor
2021-06-03 16:02:19 -07:00
Vijay Pai e66943b006
Delete unneeded parts of generic_stub callback header (#26403) 2021-06-02 12:24:45 -07:00
Ashitha Santhosh 9bbdb70cdc
Add uri sans (#26362)
* Add uri sans
2021-06-01 16:43:27 -07:00
Vijay Pai 8aff94558c
De-experimentalize C++ callback API (#25728)
* De-experimentalize callback API

* Make FromServerContext based on ServerContextBase

* Fix lambda

* Fix headers

* De-experimentalize tests

* clang-format

* Fix consistency checks

* wip

* Fix const-ness of callback client read RPC requests

* Fix golden file

* Give full route_guide callback client example with Hold etc

* Complete example route-guide server

* De-experimentalize test services

* Omit unneeded using

* Remove some uses of non-experimental macro from test

* clang-format examples

* De-experimentalize async stub calls

* Remove experimental namespace use in qps, ubms

* De-experimentalize alarms, generic stubs, and context allocator

* De-experimentalize SetContextAllocator

* clang-format

* Fix conflicts

* Leave obsolete API in place until users can be migrated
2021-05-27 14:55:25 -07:00
Esun Kim a99ead4bf4
Added new method to ByteBuffer & Slice (#26014) 2021-05-27 11:18:18 -07:00
Hung Dang e6782daf95
Fix an unused parameter warning in grpcpp/impl/codegen/service_type.h (#26346)
* Initial commit

* Address @veblush comment.
2021-05-27 11:08:30 -07:00
Vijay Pai 153bc67f45
Revert "Revert "Revert "Revert "Expose trailers-only response status through C++ callback API"" (#26365)" (#26375)" (#26379)
This reverts commit 259a74c0e6.
2021-05-27 09:16:05 -07:00
Yash Tibrewal 259a74c0e6
Revert "Revert "Revert "Expose trailers-only response status through C++ callback API"" (#26365)" (#26375)
This reverts commit 66253c521a.
2021-05-26 22:20:23 -07:00
shangwu-google 8b3f4fca25
Client context test peer (#25610)
* Create client_context_test_peer.h

mock-up class for ClientContext

* Add ClientContextTestPeer as a friend for test

* Update client_context_test_peer.h

* Update client_context_test_peer.h

* unit test for client_context_test_peer.h

* unit test for client_context_test_peer.h

* fix for tools/buildgen/generate_projects.sh

* Revert "fix for tools/buildgen/generate_projects.sh"

This reverts commit b007aa8c2b.

* re-fix for tools/buildgen/generate_projects.sh

* Remove an empty line

Co-authored-by: Vijay Pai <vpai@google.com>
2021-05-25 18:51:34 -07:00
Vijay Pai 66253c521a
Revert "Revert "Expose trailers-only response status through C++ callback API"" (#26365)
* Revert "Revert "Expose trailers-only response status through C++ callback API (#26249)" (#26363)"

This reverts commit 05c3b30ea0.

* Move the trailers_only check from ClientContext to ClientReactor

* Remove unneeded change in client_context.cc
2021-05-25 17:43:21 -07:00
Yash Tibrewal 05c3b30ea0
Revert "Expose trailers-only response status through C++ callback API (#26249)" (#26363)
This reverts commit 393bae7e88.
2021-05-25 13:44:10 -07:00
Vijay Pai 393bae7e88
Expose trailers-only response status through C++ callback API (#26249)
* Expose trailers-only response status through callback API

* Fix change-detector test

* Address reviewer comment about trailers_only headers

* Add TODO requested by markdroth

* Move variable in struct to improve space efficiency

* Don't instantiate ExecCtx in channel_args destructor unless needed
2021-05-21 14:42:41 -07:00
Alexander Gutkin c672bf94c1
Updated documentation for `addr_uri` argument in `AddListeningPort`: Removed extraneous bracket and random (?) slash. (#26263) 2021-05-21 09:34:20 -07:00
Vijay Pai 0f80378a21
Resolve race between OnReadDone(ok=false) and IsCancelled (#26245)
* Resolve and test race between OnReadDone(ok=false) and IsCancelled

* Fix retry case

* Fix health check case

* Address reviewer comments.

* ADD TODO requested by markdroth
2021-05-19 14:05:46 -07:00
AJ Heller 5b035265ce
Describe status codes on the EventEngine API (#26180)
This continues the work of ironing out EventEngine API details.
2021-05-07 12:22:48 -07:00