Commit Graph

267 Commits

Author SHA1 Message Date
Vijay Pai ea59977fbc
Merge pull request #18687 from vjpai/cancel_order
C++ Callback API: Make sure that OnCancel happens after OnStarted
2019-04-10 16:15:43 -07:00
Soheil Hassas Yeganeh e85dd2e644 Fix build errors 2019-04-10 14:15:28 -07:00
Karthik Ravi Shankar f03b309787 Revert "Merge pull request #18458 from grpc/grpc_namespace_server"
This reverts commit dc1089a6d1, reversing
changes made to 31843787cc.

This change also includes - Revert "Merge pull request #17932 from soheilhy/gprpp-mutex"

This reverts commit df4b6a763d, reversing
changes made to dc1089a6d1.
2019-04-10 13:54:05 -07:00
Karthik Ravi Shankar dad3f34207
Revert "Revert "Revert "Folding the Channel class into the grpc_impl namespace.""" 2019-04-10 12:14:04 -07:00
Vijay Pai 41c6cba9f5 Make sure that OnCancel happens after OnStarted 2019-04-10 11:32:34 -07:00
Karthik Ravi Shankar 891b6cf7ae
Revert "Folding CompletionQueue and ServerCompletionQueue." 2019-04-10 10:22:59 -07:00
Karthik Ravi Shankar d2b2f7f5a3 Merge branch 'master' into completion-queue-fold 2019-04-09 13:44:33 -07:00
Karthik Ravi Shankar 918cb46011
Merge pull request #18198 from grpc/revert-18076-revert-17797-channel
Revert "Revert "Folding the Channel class into the grpc_impl namespace.""
2019-04-09 13:34:02 -07:00
hcaseyal ca11dfb349
Merge pull request #18686 from hcaseyal/callback_doc
Update callback API documentation
2019-04-09 12:45:06 -07:00
Karthik Ravi Shankar 506ca7fc36 Fix clang script errors 2019-04-09 11:51:39 -07:00
Karthik Ravi Shankar b84d3db762 Fix build after merge from master 2019-04-09 11:11:09 -07:00
Karthik Ravi Shankar afd602ccba Merge branch 'master' into completion-queue-fold 2019-04-09 10:46:03 -07:00
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
Hope Casey-Allen b86e70592e Format 2019-04-08 10:13:17 -07:00
Hope Casey-Allen cee3292cdf Update callback API documentation 2019-04-08 09:11:04 -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