Commit Graph

644 Commits

Author SHA1 Message Date
Cheng-Yu Chung cc58369279
Remove `include/grpcpp/impl/codegen/completion_queue.h` (#31059)
* Remove `include/grpcpp/impl/codegen/completion_queue.h`

* Update

* Update

* Fix build error

* Update
2022-10-10 11:35:09 -04:00
Cheng-Yu Chung 3eb0c7f2ff
Remove `include/grpcpp/impl/codegen/client_unary_call.h` (#31058)
* Remove `include/grpcpp/impl/codegen/client_unary_call.h`

* Automated change: Fix sanity tests

* Fix

Co-authored-by: ralphchung <ralphchung@users.noreply.github.com>
2022-10-10 11:34:55 -04:00
Cheng-Yu Chung d76c6f61f0
Remove `include/grpcpp/impl/codegen/method_handler.h` (#31249) 2022-10-06 15:50:54 -04:00
Cheng-Yu Chung 488f17eb46
Remove `include/grpcpp/impl/codegen/message_allocator.h` (#31246) 2022-10-06 13:18:24 -04:00
Cheng-Yu Chung 279ec5ab45
Remove `include/grpcpp/impl/codegen/interceptor.h` (#31245) 2022-10-06 13:18:11 -04:00
Cheng-Yu Chung a192f155b9
Remove `include/grpcpp/impl/codegen/config.h` (#31061)
* Remove `include/grpcpp/impl/codegen/config.h`

* Update
2022-10-06 13:14:16 -04:00
Cheng-Yu Chung 4ba0f9afb5
Revert "Revert "Remove `include/grpcpp/impl/codegen/client_callback.h` (#31005)" (#31079)" (#31087)
This reverts commit da08fe1d6f.
2022-10-04 13:59:32 -04:00
Cheng-Yu Chung 0e8a6515df
Remove `include/grpcpp/impl/codegen/client_context.h` (#31006)
* Remove `include/grpcpp/impl/codegen/client_context.h`

* Update

* Update
2022-10-03 18:01:22 -04:00
nanahpang d84846646d
Enable logs for error message in call_op_set.h. (#31177)
* Enable logs for error message in call_op_set.h. 

The `gpr_log` was commented out from call_op_set.h at PR: https://github.com/grpc/grpc/pull/20681, because of the undefined error. It is probably just missing the header file, so adding the `gpr_log` back.

* Automated change: Fix sanity tests (#31178)

Co-authored-by: nanahpang <nanahpang@users.noreply.github.com>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: nanahpang <nanahpang@users.noreply.github.com>
2022-09-30 10:28:06 -07:00
Craig Tiller da08fe1d6f
Revert "Remove `include/grpcpp/impl/codegen/client_callback.h` (#31005)" (#31079)
This reverts commit 17f515744f.
2022-09-20 18:58:54 -07:00
Cheng-Yu Chung 0cb5faf8e4
Remove `include/grpcpp/impl/codegen/client_interceptor.h` (#31054)
* Remove `include/grpcpp/impl/codegen/client_interceptor.h`

* Update comment
2022-09-20 14:03:46 -04:00
Cheng-Yu Chung 17f515744f
Remove `include/grpcpp/impl/codegen/client_callback.h` (#31005) 2022-09-20 13:51:55 -04:00
Cheng-Yu Chung 7cb9731e4e
Remove `include/grpcpp/impl/codegen/call_op_set_interface.h` (#30990) 2022-09-16 17:27:50 -04:00
Cheng-Yu Chung bc312c7a43
Remove `include/grpcpp/impl/codegen/call.h` (#31004)
* Remove `include/grpcpp/impl/codegen/call.h`

* Update comment
2022-09-16 17:22:04 -04:00
Cheng-Yu Chung 3236174176
Remove `include/grpcpp/impl/codegen/byte_buffer.h` (#30948)
* Remove `include/grpcpp/impl/codegen/byte_buffer.h`

* Update
2022-09-14 16:47:17 -04:00
Cheng-Yu Chung d07224a13e
Remove `include/grpcpp/impl/codegen/call_hook.h` (#30967) 2022-09-14 16:44:30 -04:00
Cheng-Yu Chung b765b06155
Remove `include/grpcpp/impl/codegen/async_stream.h` (#30941)
* Remove `include/grpcpp/impl/codegen/async_stream.h`

* Fix

* Fix

* Update
2022-09-14 13:40:35 -04:00
Cheng-Yu Chung cb3d7a9e9e
Revert "Revert "Remove `include/grpcpp/impl/codegen/async_unary_call.h`"" (#30955)
* Revert "Revert "Remove `include/grpcpp/impl/codegen/async_unary_call.h` (#30945)" (#30950)"

This reverts commit 0c454fa875.

* Fix
2022-09-13 15:57:15 -04:00
Cheng-Yu Chung 6e57952589
Revert "Revert "Remove `include/grpcpp/impl/codegen/async_generic_service.h` (#30450)" (#30951)" (#30956)
This reverts commit a81b61113c.
2022-09-13 14:45:38 -04:00
Craig Tiller 0c454fa875
Revert "Remove `include/grpcpp/impl/codegen/async_unary_call.h` (#30945)" (#30950)
This reverts commit 7dbc73d4f3.
2022-09-12 16:44:07 -07:00
Craig Tiller a81b61113c
Revert "Remove `include/grpcpp/impl/codegen/async_generic_service.h` (#30450)" (#30951)
This reverts commit c6326bbc75.
2022-09-12 16:43:55 -07:00
Cheng-Yu Chung c6326bbc75
Remove `include/grpcpp/impl/codegen/async_generic_service.h` (#30450)
* Remove `include/grpcpp/impl/codegen/async_generic_service.h`

* Fix test

* Reserve compatibility
2022-09-12 18:19:59 -04:00
Cheng-Yu Chung 7dbc73d4f3
Remove `include/grpcpp/impl/codegen/async_unary_call.h` (#30945) 2022-09-12 18:05:10 -04:00
Craig Tiller 254bd7b6f6
[core] Remove GRPC_INITIAL_METADATA_CORKED flag (#30443)
This functionality is entirely implemented in the C++ bindings layer, and so does not need a flag passed down to core (which core already ignores silently).
2022-08-02 09:16:02 -07:00
Yash Tibrewal b9aec4def7
Status: Add comment about const ref parameters (#29973) 2022-06-13 15:31:03 -07:00
Mark D. Roth 65a7ce3f04
Revert "Revert "server: add method to expose authority seen by server (#29768)" (#29806)" (#29807)
This reverts commit e39e943529.
2022-05-31 14:15:45 -07:00
Mark D. Roth e39e943529
Revert "server: add method to expose authority seen by server (#29768)" (#29806)
This reverts commit 449adce98b.
2022-05-26 16:15:14 -07:00
Mark D. Roth 449adce98b
server: add method to expose authority seen by server (#29768)
* server: add method to expose authority seen by server

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-05-26 15:03:28 -07:00
Nicolas Noble 667691c499
server: per-rpc backend metric reporting (#29621)
Users can now report per-rpc metrics from servers to clients.
2022-05-20 15:54:30 -07:00
Craig Tiller 0f9d024fec
[iwyu] c++ (#29721)
* Revert "Revert "[iwyu] grpc++ (#29610)" (#29720)"

This reverts commit 0642bc213d.

* fixup status_code_enum import issue

* fix

* Automated change: Fix sanity tests

* import fixes

* fix import

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-05-19 07:34:48 -07:00
AJ Heller 93e6894485
Revert "Fix gRPC C++ init bug (#29689)" (#29701)
This reverts commit de613e3a9e.
2022-05-16 10:48:50 -07:00
Esun Kim de613e3a9e
Fix gRPC C++ init bug (#29689) 2022-05-14 13:56:08 -07:00
Esun Kim c20f10310c
Added GRPC_MUST_USE_RESULT_WHEN_USE_STRICT_WARNING to grpc::Status (#29363)
* Added GRPC_MUST_USE_RESULT_WHEN_USE_STRICT_WARNING to grpc::Status

* Added Comment
2022-05-05 12:07:07 -07:00
chrisse74 5968cb62c8
Fix deprecated inheritance of std::iterator (#28212) 2022-04-22 13:25:04 -07:00
Vignesh Babu 6f3d7ccdb1
Modifying slice buffer add to merge two contiguous slices sharing the same refcount object (#29466)
* Modifying slice buffer add to merge two contiguous slices sharing the same refcount object

* sanity checks

* updating test

* fixing grpc_slice_buffer_add API misuse in proto utils

* fix sanity checks

* minor fix
2022-04-22 11:54:41 -07:00
Craig Tiller 1dff2dc660
We must always post a recv initial metadata (#29145)
* We must always post a recv initial metadata

* remove spurious change
2022-03-17 17:28:14 -07:00
Craig Tiller fe913387da
Remove idempotent/cacheable requests (#28922)
* Remove idempotent/cacheable requests

* more cleanup

* bump core version

* fix

* fix

* fix

* review feedback

* fixes

* fix

* remove more

* objc

* fix

* fix

* fix

* scrub

* Modify XdsRbacTests

Co-authored-by: Yash Tibrewal <yashkt@google.com>
2022-03-04 14:42:59 -08:00
AJ Heller 85189b24bb
Reintroduce: Avoid fully qualifying namespaces (and add check) (#28917)
Based on a handful of https://abseil.io/tips, it's generally advised to
only fully-qualify namespaces when in a `using` statement, or when it's
otherwise required for compilation. In all other cases, the general
recommendation is to not fully-qualify.

This change fixes most `grpc.*` namespace uses. There are potential
challenges in trying to make blanket changes to non-gRPC namespace uses,
such as `::testing`, since there is also a `grpc::testing` namespace.
2022-02-18 16:18:54 -08:00
AJ Heller e72a5fe5dd
Revert "Avoid fully qualifying namespaces (and add check) (#28901)" (#28916)
This reverts commit fc7314c701.
2022-02-17 17:56:19 -08:00
AJ Heller fc7314c701
Avoid fully qualifying namespaces (and add check) (#28901)
Based on a handful of https://abseil.io/tips, it's generally advised to
only fully-qualify namespaces when in a `using` statement, or when it's
otherwise required for compilation. In all other cases, the general
recommendation is to not fully-qualify.

This change fixes most `grpc.*` namespace uses. There are potential
challenges in trying to make blanket changes to non-gRPC namespace uses,
such as `::testing`, since there is also a `grpc::testing` namespace.
2022-02-17 16:23:25 -08:00
Nikolai Semenov 7b8fb43b33
WriteOptions::clear_write_through method (#26774)
* Add WriteOptions::clear_write_through method

* Rearrange WriteOptions methods in a logical manner
2022-01-31 18:36:46 -08:00
AJ Heller 5dfeec7a7e
Update docs for ServerAsyncResponseWriter::Finish object lifetimes (#28290)
Fixes #28239
2022-01-26 20:43:44 -08:00
Yash Tibrewal 50a207ee9c
Promote ClientContext::set_wait_foor_ready to be non-experimental (#28247) 2021-12-01 18:57:41 -08:00
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
Esun Kim d812b0cf38 Fix errors in doxygen param descriptions 2020-10-22 10:42:59 -07:00
Vijay Pai 6f7a98916b Reduce template use in server 2020-10-21 13:33:16 -07:00
Vijay Pai 476743786b Also reduce templating for ClientUnaryReactor 2020-10-20 04:12:40 -07:00
Vijay Pai 97924fcfb2
Merge pull request #24420 from vjpai/sync_client_code_size_v2
Reduce sync client templating for protobuf without protobuf dependence
2020-10-20 00:08:17 -07:00
Vijay Pai 8f9233ca30
Merge pull request #24423 from vjpai/callback_client_code_size_v2
Reduce templating for unary callback client RPC without protobuf dependence
2020-10-20 00:07:51 -07:00
Esun Kim 34789b2d83 Fix by clang-format-8. 2020-10-16 11:37:18 -07:00
Vijay Pai ef212a908e Reduce sync client templating for protobuf 2020-10-15 04:48:20 -07:00