Commit Graph

551 Commits

Author SHA1 Message Date
Esun Kim f4c18944e2
Early exit BackUp() on count == 0 (#27946) 2021-11-05 10:18:49 -07:00
Alisha Nanda 0a502d8f2e
Fix race between Read and ServerContext::IsCancelled in Sync API (#27056)
* Fix OOM issues in qps tests

* Add more verbose logging.

* Fix clang error

* Fix race between IsCancelled and Read

* Fix build errors from using bool in C code
2021-09-15 12:29:02 -07:00
Craig Tiller ea389c00c2
Adjust include order per style guide (#27175)
Introduce clang-format configuration to sort includes closer to our rules.
2021-09-08 12:14:44 -07:00
Craig Tiller 28316341bf
Annotate impl/codegen with IWYU pragmas (#27252)
* Add a tool to annotate impl/codegen with IWYU pragmas

* xx

* oops

* fmt

* x

* fix wrong direction bug

* use defaultdict

* better annotations

* better annotations

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-09-08 09:13:03 -07:00
AJ Heller 0407f4be49
Fix free-after-use bug in server callback handler (#27187)
Successful asan run https://source.cloud.google.com/results/invocations/33bc587c-a440-45bd-9886-a23789645a7d/targets

Successful TGP available upon request.
2021-08-31 11:01:57 -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
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
Esun Kim 931f91b745
Changed GRPCPP_ABSEIL_SYNC to GPR_ABSEIL_SYNC (#25681) 2021-08-02 12:18:21 -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
Vijay Pai 3e19babc1e
Remove all possible traces of grpc::experimental for callback API (#26584) 2021-06-30 19:55:08 -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 ea4b68e7a1
Drop experimental tags from core callback API (#26535) 2021-06-24 17:20:43 -07:00
Vijay Pai cf1ebf7387
Remove experimental tag from uses of the C++ callback API (#26495) 2021-06-20 00:47:07 -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
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
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
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
Vijay Pai edf500fb82
Add useful status error message when server threadpool is exhausted (#26146) 2021-05-03 12:16:12 -07:00
mkruskal-google 2bf75aa68a
Add optional suffix to client-side stub objects (#25996)
* Adding suffix for stats handling to gRPC

* Fixing typo

* Fixing codegen, adding tests

* Fixing test failures

* Adding nullptr default in StubOptions

* Updating golden test file

* Replacing std::make_unique with absl::make_unique for pre-C++14 compatibility

* Fixing clang format  errors

* Reuse stub options for generic stubs

* Cleaning up compiler warnings in GenericStub
2021-04-26 17:19:43 -07:00
Esun Kim 2dc8df9ef6
Fix bugprone unhandled self assignment (#25667)
* Add bugprone-unhandled-self-assignment

* Fix bugprone-unhandled-self-assignment
2021-03-10 13:38:23 -08:00
Esun Kim a41a206b8c
Fix readability-const-return-type,readability-delete-null-pointer,readability-simplify-boolean-expr (#25628) 2021-03-09 21:30:35 -08:00
Vijay Pai dae5624e47
Thread annotations for C++ callback API headers (#25571)
* Annotate headers

* clang-format
2021-03-04 10:15:21 -08:00
Esun Kim f862a2259f
Add abseil thread annotations to grpcpp/sync (#25560)
* Add abseil annotation to grpcpp/sync
* Bump alpine linux to 3.11 from 3.9
2021-03-03 08:39:20 -08:00
Vijay Pai 26e4c14b1e
Add virtual destructor to ClientReactor base class (#25599)
* Add virtual destructor

* Remove subclass empty destructors
2021-03-02 21:08:07 -08:00
WANG Lei f99a08fe46
Remove unused parameter from UnaryDeserializeHelper (#25332)
* fix -Wunused-parameter warning

* clang-fmt

* clang-format

Co-authored-by: Vijay Pai <vpai@google.com>
2021-03-02 17:51:36 -08:00
Vijay Pai 909cac3866
Document reaction concurrency and reactor lifetime (#25481) 2021-02-24 09:18:15 -08:00
Vijay Pai dba8bb59a0 Implement callback CQ at C++ layer using shared thread pool if non-background iomgr 2021-02-16 16:02:23 -08:00
Esun Kim 6468d8a69d Make grpcpp/mutex compatible absl/mutex 2021-02-11 15:02:42 -08:00
mkruskal-google 0416696848
Update auth_context.h 2021-01-28 16:27:48 -05:00
ZhouyihaiDing a584bc4f02 Support ServerContext for callback API 2021-01-19 22:00:10 -08:00
AJ Heller ec9451e856 Fix typo in documentation 2021-01-13 11:23:50 -08:00
Vijay Pai 91bb4e178c Check for nullptr (deser failure) before destructing included request 2021-01-13 01:33:13 -08:00
Adam Cozzette 63ee5b62c2 Updated parse_json.cc to rely on config_protobuf.h for protobuf types
Google's internal version of the gRPC codebase uses a version of
protobuf with a different namespace and include paths. This commit makes
parse_json.cc rely on config_protobuf.h for protobuf types so that it
will work properly in that environment. I also replaced a call to
Status::error_code() with a call to Status::code() instead. This way the
code will work with absl::Status, which has a somewhat different API
compared to google::protobuf::util::Status.
2020-12-23 15:55:17 -08:00
Esun Kim 20509e823d Fix google-explicit-constructor 2020-12-03 19:22:22 -08:00
Esun Kim decc199ca8 Fix by clang-tidy 2020-12-03 16:24:19 -08:00
Vijay Pai afe4d1d086 Reduce templating for async client unary call codegen 2020-10-30 14:26:47 -07:00
Vijay Pai 3ecb008aa0
Merge pull request #24494 from vjpai/server_code_size
Reduce template use in sync server unary calls
2020-10-29 22:56:51 -07:00
Esun Kim 9936d7785c
Merge pull request #24198 from chrisse74/protoUtilsStaticCast
proto_utils.h: suppress conversion warning
2020-10-25 09:26:05 -07:00
Esun Kim 43333b4232
Merge pull request #24535 from veblush/clean-up-WriteOptions
Clean up WriteOptions cctor
2020-10-23 10:52:58 -07:00
Vijay Pai 96503e3c72 Reduce code paths 2020-10-22 22:29:22 -07:00
Esun Kim 119228e7bb Clean up WriteOptions cctor 2020-10-22 11:11:09 -07:00