Commit Graph

250 Commits

Author SHA1 Message Date
Karthik Ravi Shankar 5a08d2aae7 Merge branch 'master' into revert-18076-revert-17797-channel 2019-04-09 08:22:37 -07:00
Karthik Ravi Shankar 53c5bf5ced Merge branch 'master' into revert-18076-revert-17797-channel 2019-04-08 16:04:24 -07:00
Soheil Hassas Yeganeh a26c09dd25 Introduce C++ wrappers for gpr_mu and gpr_cv.
Introduce RAII wrappers in the grpc::internal and grpc_core
namespaces, and use them in place of std::mutex and
std::condition_variable.

Note that, since std::mutex is also used by the public
C++ headers we cannot introduce these wrappers in grpc_core.

Also, note that in grpcpp we cannot use gRPC core and vice versa.
So we had to duplicate the code, once using core_codegen_interface
and once using direct calls.
2019-04-08 18:27:07 -04:00
Karthik Ravi Shankar 4cb0d0d6b1 Fix errors from clang scripts 2019-04-08 13:41:19 -07:00
Karthik Ravi Shankar 9875fabdd4 Merge branch 'master' into revert-18076-revert-17797-channel 2019-04-08 12:55:07 -07:00
Karthik Ravi Shankar 958f373d32 Merge branch 'master' into grpc_namespace_server 2019-04-08 12:42:37 -07:00
Karthik Ravi Shankar c50dd23ea7 Merge branch 'master' into grpc_namespace_server 2019-04-04 15:56:09 -07:00
Karthik Ravi Shankar dd39f78e3f Merge branch 'master' into revert-18502-revert-18242-grpc_namespace_serverbuilder 2019-04-04 15:45:42 -07:00
Karthik Ravi Shankar 8a2807c2a6 Merge branch 'master' into grpc_namespace_server 2019-04-03 12:46:41 -07:00
Karthik Ravi Shankar f0d82d57e2 Merge branch 'master' into grpc_namespace_server_credentials 2019-04-01 13:59:12 -07:00
Karthik Ravi Shankar 29c0aacfc0 Merge branch 'master' into revert-18502-revert-18242-grpc_namespace_serverbuilder 2019-03-29 08:24:54 -07:00
Vijay Pai 847b0155d9 Promise to call OnStarted and forbid Start* until after OnStarted 2019-03-27 16:30:07 -07:00
Karthik Ravi Shankar dc3a715be4 Fix clang format code errors. 2019-03-27 14:33:58 -07:00
Karthik Ravi Shankar c399349dad Merge branch 'master' into grpc_namespace_server 2019-03-27 14:32:10 -07:00
Karthik Ravi Shankar 7068560b2b Merge branch 'master' into grpc_namespace_server_credentials 2019-03-27 14:18:42 -07:00
Karthik Ravi Shankar 0f078898d5 Merge branch 'master' into revert-18502-revert-18242-grpc_namespace_serverbuilder 2019-03-27 12:50:49 -07:00
Vijay Pai abb991be25 Further clarify some APIs by removing their comments from internal:: 2019-03-27 09:46:08 -07:00
Vijay Pai 9169159f30 Comments for all callback API methods 2019-03-26 23:33:23 -07:00
Karthik Ravi Shankar 996da58667
Revert "Revert "Moving ::grpc::ServerBuilder to ::grpc_impl::ServerBuilder"" 2019-03-26 08:04:32 -07:00
Karthik Ravi Shankar e4bb7cb8bb
Revert "Moving ::grpc::ServerBuilder to ::grpc_impl::ServerBuilder" 2019-03-25 19:57:17 -07:00
Vijay Pai f4fdd829d7
Merge pull request #17892 from RohanTalip/HandlerParameter-doc
Renamed the param in the documentation for HandleParameter to match the actual parameter.
2019-03-25 16:46:17 -07:00
Karthik Ravi Shankar 88fc2a6a52
Merge pull request #18242 from grpc/grpc_namespace_serverbuilder
Moving ::grpc::ServerBuilder to ::grpc_impl::ServerBuilder
2019-03-25 15:59:01 -07:00
Soheil Hassas Yeganeh ad1b3e5094 Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
grpc_byte_buffer_reader_next() copies and references the slice. This
is not always necessary since the caller will not use the slice
after destroying the byte buffer.

A prominent example is the protobuf parser, which
calls grpc_byte_buffer_reader_next() and immediately unrefs the slice
after the call. This ref() and unref() calls can be very expensive
in the hot path.

This commit introduces grpc_byte_buffer_reader_peek() which
essentialy return a pointer to the slice in the buffer, i.e.,
no copies, and no refs.

QPS of 1MiB 1 Channel callback benchmark increases by 5%.
More importantly insructions per cycle is increased by 10%.

Also add tests and benchmarks for byte_buffer_reader_peek()

This commit reaplies 509e77a5a3
2019-03-21 06:03:45 -04:00
Vijay Pai 50576179f8
Merge pull request #17978 from yashykt/interceptorcleanup1
Global Interceptor Registration allowed only once
2019-03-20 19:13:55 -07:00
Karthik Ravi Shankar 04af168cf8 Move Server into grpc_impl from grpc 2019-03-20 13:05:36 -07:00
Karthik Ravi Shankar 54171e276f Fold server credentials from grpc to grpc_impl namespace 2019-03-20 10:00:34 -07:00
Vijay Pai 7b3a120295 Address reviewer comments 2019-03-18 16:51:15 -07:00
Vijay Pai 93f0a3f653 Address reviewer comments 2019-03-18 15:37:35 -07:00
Vijay Pai 04a6b8467c Support callback on cancellation of server-side unary RPCs 2019-03-18 12:00:57 -07:00
Karthik Ravi Shankar 322e720fe6 Merge branch 'master' into grpc_namespace_serverbuilder 2019-03-18 10:39:38 -07:00
Vijay Pai 8c3d4a7dfd
Merge pull request #18072 from vjpai/client_streaming_hold
C++ callback API: Add support for client-side extra-reaction operations via Holds
2019-03-16 10:27:36 -07:00
Vijay Pai 48ce4ca939 Add support for extra-reaction operations via Holds 2019-03-15 16:17:01 -07:00
Norman Link 3d28761029 Fixing memory leak in interceptor by removing unsued send_status_ 2019-03-13 21:42:02 +01:00
Karthik Ravi Shankar 3b7a47cde6 Moving ::grpc::ServerBuilder to ::grpc_impl::ServerBuilder
This change moves ServerBuilder class from grpc namespace to grpc_impl
namespace.
2019-03-04 17:01:14 -08:00
Vijay Pai 05d8ddfc6e Support callback-based generic service 2019-03-04 13:13:12 -08:00
Soheil Hassas Yeganeh 509e77a5a3 Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
grpc_byte_buffer_reader_next() copies and references the slice. This
is not always necessary since the caller will not use the slice
after destroying the byte buffer.

A prominent example is the protobuf parser, which
calls grpc_byte_buffer_reader_next() and immediately unrefs the slice
after the call. This ref() and unref() calls can be very expensive
in the hot path.

This commit introduces grpc_byte_buffer_reader_peek() which
essentialy return a pointer to the slice in the buffer, i.e.,
no copies, and no refs.

QPS of 1MiB 1 Channel callback benchmark increases by 5%.
More importantly insructions per cycle is increased by 10%.

Also add tests and benchmarks for byte_buffer_reader_peek()
2019-03-04 14:17:46 -05:00
Nicolas Noble 91ad888497
Revert "Revert "Folding the Channel class into the grpc_impl namespace."" 2019-02-27 16:53:23 -08:00
Vijay Pai 2eb25c871e Avoid build errors 2019-02-26 03:08:06 -08:00
Vijay Pai 857e622e6f
Merge pull request #18098 from vjpai/try_2
Reduce starting callback counter to exclude client-side StartCall
2019-02-22 19:52:29 -08:00
Vijay Pai 147c61b2a4 Exclude StartCall from starting callback counter value 2019-02-20 21:13:44 -08:00
Yuwei Huang 3cbf4f50ea Remove extra semicolons after function definitions
We are planning to enable -Wextra-semi flag in our project but some
header files in gRPC have extra semicolons that violates the check and
blocks us from enabling the flag.

This change removes unnecessary semicolons in the code. Note that having
semicolon after the GRPC_ABSTRACT macro technically also violates the
check, but it's fine for us since they are not used in public headers,
and it will be confusing to have lines ending only with GRPC_ABSTRACT,
so I keep them as-is.
2019-02-20 17:58:30 -08:00
Nicolas Noble 2ad245cb0c
Revert "Folding the Channel class into the grpc_impl namespace." 2019-02-15 09:52:15 -08:00
Yash Tibrewal 73353ad281 Merge branch 'master' into interceptorcleanup1 2019-02-13 12:47:47 -08:00
Yash Tibrewal 50497c2317 Reviewer comments 2019-02-13 12:46:07 -08:00
Nicolas "Pixel" Noble 63db582516 Merge branch 'master' of https://github.com/grpc/grpc into channel 2019-02-13 00:19:23 +01:00
Yash Tibrewal c71b2f4fb7 Global Interceptor Registration allowed only once 2019-02-07 19:36:51 -08:00
Yash Tibrewal 89ee1a8b10 Improved interception docs 2019-02-07 19:18:40 -08:00
Rohan Talip d68c0d29d9 Renamed the param in the documentation for HandleParameter to match the actual parameter.
This should prevent warnings like the following:

=== BUILD TARGET FirebaseFirestore OF PROJECT Pods WITH CONFIGURATION Debug ===
In file included from $PROJECT_DIR/platforms/ios/Pods/FirebaseFirestore/Firestore/core/src/firebase/firestore/remote/stream.mm:17:
In file included from $PROJECT_DIR/platforms/ios/Pods/FirebaseFirestore/Firestore/core/src/firebase/firestore/remote/stream.h:27:
In file included from $PROJECT_DIR/platforms/ios/Pods/FirebaseFirestore/Firestore/core/src/firebase/firestore/remote/grpc_connection.h:28:
In file included from $PROJECT_DIR/platforms/ios/Pods/FirebaseFirestore/Firestore/core/src/firebase/firestore/remote/grpc_stream.h:35:
In file included from $PROJECT_DIR/platforms/ios/build/emulator/grpcpp.framework/Headers/generic/generic_stub.h:24:
In file included from $PROJECT_DIR/platforms/ios/build/emulator/grpcpp.framework/Headers/support/async_stream.h:22:
In file included from $PROJECT_DIR/platforms/ios/build/emulator/grpcpp.framework/Headers/impl/codegen/async_stream.h:26:
In file included from $PROJECT_DIR/platforms/ios/build/emulator/grpcpp.framework/Headers/impl/codegen/service_type.h:24:
$PROJECT_DIR/platforms/ios/build/emulator/grpcpp.framework/Headers/impl/codegen/rpc_service_method.h:49:16: warning: parameter 'rpc_requester' not found in the function declaration
      [-Wdocumentation]
    /// \param rpc_requester : used only by the callback API. It is a function
               ^~~~~~~~~~~~~
$PROJECT_DIR/platforms/ios/build/emulator/grpcpp.framework/Headers/impl/codegen/rpc_service_method.h:49:16: note: did you mean 'requester'?
    /// \param rpc_requester : used only by the callback API. It is a function
               ^~~~~~~~~~~~~
               requester
1 warning generated.
2019-02-01 12:56:56 -08:00
Yash Tibrewal 5e2e61b6e5 Note on conditions of usage 2019-01-28 16:37:02 -08:00
Yash Tibrewal 3a2cfe50ec Rever copyright changes 2019-01-28 16:18:49 -08:00