Commit Graph

1496 Commits

Author SHA1 Message Date
Karthik Ravi Shankar e4bb7cb8bb
Revert "Moving ::grpc::ServerBuilder to ::grpc_impl::ServerBuilder" 2019-03-25 19:57: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
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
Karthik Ravi Shankar 2bf934f97d
Revert "Fold opencensus into grpc_impl namespace" 2019-03-15 10:20:06 -07:00
Vijay Pai 85f8e0f4b0
Merge pull request #18289 from vjpai/unimplemented_rpc
C++ callback API: properly handle and test unimplemented RPC method
2019-03-13 12:47:36 -07:00
Karthik Ravi Shankar b3889585a1
Revert "Moving ::grpc::ResourceQuota to ::grpc_impl::ResouceQuota" 2019-03-12 12:25:38 -07:00
Karthik Ravi Shankar cc632f8121
Merge pull request #18220 from grpc/grpc_namespace
Moving ::grpc::ResourceQuota to ::grpc_impl::ResouceQuota
2019-03-12 11:20:27 -07:00
Karthik Ravi Shankar 276c4dc593
Merge pull request #18223 from grpc/grpc_namespace_opencensus
Fold opencensus into grpc_impl namespace
2019-03-08 15:45:03 -08:00
Soheil Hassas Yeganeh ac9c67d851
Merge pull request #18229 from soheilhy/server-ctx-lock
Use grpc_core::RefCount for ServerContext.
2019-03-08 16:03:16 -05:00
Vijay Pai b7f14fdab8 Properly implement unimplemented RPCs at callback-only server 2019-03-06 23:43:34 -08:00
Vijay Pai 5030177c5c Add comment to address reviewer feedback 2019-03-06 18:17:11 -08:00
Karthik Ravi Shankar 5e5e337b03 fix from clang format code
Add fixes from clang_format_code.sh.
2019-03-06 10:21:37 -08:00
Karthik Ravi Shankar f7dd48b2b6 Moving ::grpc::ResourceQuota to ::grpc_impl::ResouceQuota
This change moves ResourceQuota class fron grpc namespace to grpc_impl
namespace.
2019-03-06 10:12:23 -08: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
Karthik Ravi Shankar b606cad6cc Fold opencensus into grpc_impl namespace
Moving opencensus into grpc_impl namespace..
2019-03-04 15:47:37 -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
Soheil Hassas Yeganeh 059e104475 Use grpc_core::RefCount for ServerContext. 2019-03-02 23:25:18 -05:00
Vijay Pai 2eb25c871e Avoid build errors 2019-02-26 03:08:06 -08:00
Vijay Pai 8feb16171a Add an expectation and fix a ServerContext bug 2019-02-25 00:48:11 -08:00
Vijay Pai bf2b0e5220
Merge pull request #18117 from vjpai/use_result
Avoid unused result warning
2019-02-20 23:21:13 -08:00
Vijay Pai 301ed88a43 Avoid unused result warning 2019-02-20 21:39:02 -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
Nguyen Hai Truong 9cf00ed80b Reformat some link and fix typos
Signed-off-by: Nguyen Hai Truong <truongnh@vn.fujitsu.com>
2019-02-20 23:19:33 +07:00
Nicolas Noble 2ad245cb0c
Revert "Folding the Channel class into the grpc_impl namespace." 2019-02-15 09:52:15 -08:00
Nicolas "Pixel" Noble de332cfcee Merge branch 'master' of https://github.com/grpc/grpc into channel 2019-02-13 22:11:47 +01:00
Yash Tibrewal 73353ad281 Merge branch 'master' into interceptorcleanup1 2019-02-13 12:47:47 -08:00
hcaseyal eecd983302
Merge pull request #18025 from soheilhy/callback-sync-cq
Reorder code to set num_frequently_polled_cqs correctly.
2019-02-13 12:39:11 -08:00
Srini Polavarapu f7f6861720
Merge pull request #18033 from srini100/master
Bump master to v1.20.x and pick "godric" for that release
2019-02-13 12:17:12 -08:00
Nicolas "Pixel" Noble 0c19be2fc8 Fixing cronet 2019-02-13 20:12:13 +01:00
Nicolas "Pixel" Noble 39d3b7335c Missed a spot. 2019-02-13 19:17:18 +01:00
Jan Tattermusch bc19ba1668
Merge pull request #18037 from xichengliudui/fixtypos
Fix various typos in .cc and .md and .py files
2019-02-13 13:24:34 +01:00
Srini Polavarapu b0efc103e3 Regenerate projects 2019-02-12 21:07:42 -08:00
Soheil Hassas Yeganeh 37c1f0bd54 Reorder code to set num_frequently_polled_cqs correctly.
When there num_frequently_polled_cqs is non-zero (aka hybrid server),
we create non-polling CQs for the sync methods. But, since we
increase num_frequently_polled_cqs for callback methods
after creating the sync CQs, the sync CQs would not detect
a hyprid server, and will create a polling CQ.

This commit reorders the logic, so that we increment
num_frequently_polled_cqs upon detecting a callback service.

This lowers the context switches by double digit percentage
when using callback API.
2019-02-12 23:04:41 -05:00
Nicolas "Pixel" Noble 63db582516 Merge branch 'master' of https://github.com/grpc/grpc into channel 2019-02-13 00:19:23 +01:00
xichengliudui d9b508c896 Fix various typos in .cc and .md and .py files 2019-02-12 11:11:43 -05:00
Yash Tibrewal cddb5519f2 Add a test only method to reset global interceptor 2019-02-08 15:57:29 -08:00
Yash Tibrewal c71b2f4fb7 Global Interceptor Registration allowed only once 2019-02-07 19:36:51 -08:00
Yash Tibrewal e5eb3f8019
Merge pull request #17934 from yashykt/compressionlevel
Default compression level quick fix
2019-02-06 11:46:19 -08:00
Yash Tibrewal 84a537b1d1 Default compression level quick fix 2019-02-05 14:22:47 -08:00
Vijay Pai 45c684f894 Allow an alarm to be set again after firing 2019-02-05 14:07:40 -08:00
Vijay Pai 92d37b1273 SOFT_MAXIMUM is supposed to be per-server, not per-method 2019-02-02 09:14:05 -08:00
Vijay Pai 8521c0394b Address optional reviewer comments 2019-02-01 15:21:13 -08:00
Vijay Pai e56c832c0d Replace list of outstanding callback requests with count only 2019-02-01 13:44:50 -08:00
Yash Tibrewal 3a2cfe50ec Rever copyright changes 2019-01-28 16:18:49 -08:00
Yash Tibrewal 786598a6ff Merge branch 'master' into interceptorcqavalanching 2019-01-28 11:54:39 -08:00
Juanli Shen 6c543919ed
Merge pull request #17707 from kakshay21/akshay-fix-warning
Fix warning
2019-01-26 21:06:11 -08:00