Commit Graph

37607 Commits

Author SHA1 Message Date
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
Soheil Hassas Yeganeh f2529fee0a Merge pull request #18451 from soheilhy/atomic-fix
Fix a typo in CompareExchangeStrong()
2019-03-20 18:10:46 -04:00
Yash Tibrewal 668fc0cf32 Merge pull request #18440 from yashykt/err_recv
Add the actual peer in the error message
2019-03-20 13:53:50 -07:00
yihuaz b245ad4ae8 Merge pull request #18438 from yihuazhang/fix_php_test_failure
Fix php PersistentListTest test
2019-03-20 13:04:27 -07:00
Soheil Hassas Yeganeh e6cae04e5f Fix a typo in CompareExchangeStrong()
Use compare_exchange_strong() instead of compare_exchange_weak(), which
can be spuriously fail on some platforms.

Thanks to Mark Roth to pointing this out!
2019-03-20 10:44:07 -04:00
Mark D. Roth ba7da20f1d Merge pull request #18368 from markdroth/lb_policy_api_cleanup
LB policy API cleanup
2019-03-20 07:17:01 -07:00
Nicolas Noble cc125b9a37 Merge pull request #18406 from nicolasnoble/non-trivial-memset
Removing a few more non-trivial struct memsets, part 3.
2019-03-19 19:13:08 -07:00
Yihua Zhang 235fa49055 fail-fast if no pem root certs are available. 2019-03-19 18:38:08 -07:00
Vijay Pai 3b2b0f97a7 Merge pull request #18442 from hcaseyal/change_timeout
Increase timeout for test
2019-03-19 17:55:42 -07:00
Hope Casey-Allen 6ecf74f641 Increase timeout for test 2019-03-19 16:32:41 -07:00
Yash Tibrewal 2c6849af7b s/peer/grpc_call_get_peer 2019-03-19 15:49:17 -07:00
Yash Tibrewal ec82dbae39 Add the actual peer in the error message 2019-03-19 15:05:54 -07:00
Vijay Pai 5dff0812bc Merge pull request #18341 from vjpai/cancel_callback
Support callback on cancellation of server-side unary RPCs
2019-03-19 14:42:20 -07:00
Nicolas "Pixel" Noble 26984e2a96 Merge branch 'master' of https://github.com/grpc/grpc into non-trivial-memset 2019-03-19 22:41:28 +01:00
Lidi Zheng 0c70b0f008 Merge pull request #18414 from evanj/utf8-encodable
python docs: details are UTF-8 encodable, not just ASCII.
2019-03-19 12:59:22 -07:00
Stanley Cheung 0eca1b1031 Merge pull request #18427 from stanley-cheung/fix-php-mac-build
Fix PHP unit test warnings
2019-03-19 09:57:55 -07:00
Jan Tattermusch fb9bb6be62 Merge pull request #18429 from Falco20019/Falco20019/helloworld-legacy-readme
Update README.md of C# helloworld legacy example
2019-03-19 09:43:30 -07:00
Yang Gao 6ffdb37f50 Merge pull request #18415 from yang-g/census
Update opencensus
2019-03-19 08:46:19 -07:00
Mark D. Roth a41a381302 Merge pull request #18353 from markdroth/grpclb_fallback_when_balancer_call_fails
grpclb fallback-at-startup improvements
2019-03-19 07:02:52 -07:00
Benjamin Krämer 6e2ad131fc Update README.md
Fixed misleading information about supported VS version
2019-03-19 14:45:04 +01:00
Jan Tattermusch 7208746f0a Merge pull request #18324 from tylersouthard/xamarin.ios-armv7
Add armv7 support for Xamarin.iOS native libraries
2019-03-19 05:59:34 -07:00
Jan Tattermusch 4c4a20b2f2 Merge pull request #18421 from jtattermusch/fix_grpc_dotnet_interop
Fix grpc-dotnet interop tests
2019-03-19 05:47:53 -07:00
Jan Tattermusch 385af3bc61 fixup 2019-03-19 07:25:23 -04:00
Stanley Cheung b82913c752 Fix PHP mac build 2019-03-18 21:18:58 -07:00
Stanley Cheung 9c29708896 Merge pull request #18420 from stanley-cheung/fix-php-qps-build
Fix broken php7 performance benchmarks build
2019-03-18 17:55:47 -07:00
rmstar 52801f088c Merge pull request #18409 from rmstar/cfstreamtests
Fix CFStreamTests
2019-03-18 16:58:10 -07:00
Vijay Pai 7b3a120295 Address reviewer comments 2019-03-18 16:51:15 -07:00
vishalpowar 4d2effa410 Merge pull request #18393 from vishalpowar/xds_discovery_upb_generate
Add BUILD rule and generated upb code for protos required to do Discov…
2019-03-18 15:57:23 -07:00
Vijay Pai f12f862d28 Strengthen test 2019-03-18 15:52:58 -07:00
Vijay Pai 0cb0cdb7e3 Address reviewer comments on test 2019-03-18 15:46:27 -07:00
Vijay Pai 93f0a3f653 Address reviewer comments 2019-03-18 15:37:35 -07:00
Stanley Cheung 0a8fbd2a67 Fix broken php7 performance benchmarks build 2019-03-18 15:12:46 -07:00
Jan Tattermusch c24acc3d4a fix grpc-dotnet interop tests 2019-03-18 22:29:08 +01:00
Mark D. Roth 233d3e27ff grpclb fallback-at-startup improvements 2019-03-18 13:40:23 -07:00
Jan Tattermusch 224fb25534 Merge pull request #18356 from JunTaoLuo/designtime-build
Enable design time builds by default
2019-03-18 21:17:24 +01:00
Vijay Pai 04a6b8467c Support callback on cancellation of server-side unary RPCs 2019-03-18 12:00:57 -07:00
Mark D. Roth 6a4ddc967f Merge pull request #18344 from markdroth/grpclb_fallback_after_startup
grpclb fallback after startup
2019-03-18 11:42:39 -07:00
Yang Gao 2ee9795183 Merge pull request #18156 from mkbehr/interop-client-additional-metadata
Let the c++ interop_client send additional metadata, controlled by a flag.
2019-03-18 11:31:20 -07:00
Juanli Shen 149eb4046e Merge pull request #18401 from AspirinSJL/fix_grpclb_rere
Fix reresolution condition in grpclb
2019-03-18 10:49:55 -07:00
Prashant Jaikumar f6479caf2a Fix CFStreamTests
- Pass extra param to grpc_endpoint_read() as the API has changed.
- Fixed build error seen with Xcode 10.
- Enable pipefail to xcodebuild errors are propagated to the caller.
2019-03-18 10:47:41 -07:00
Jan Tattermusch f019bcb4a0 Merge pull request #18413 from jtattermusch/interop_get_dotnet
Ensure we have the right version of dotnet SDK when building grpc-dotnet interop image.
2019-03-18 18:31:01 +01:00
Lidi Zheng 47c1479b8c Merge pull request #18398 from lidizheng/fix-18244-take-2
Use C-Core API to perform time conversion
2019-03-18 10:07:12 -07:00
Mark D. Roth adc2163038 Go into fallback mode when losing contact with balancer and backends. 2019-03-18 09:08:38 -07:00
yang-g 38b82fb7c3 Update opencensus to fix build 2019-03-18 08:55:15 -07:00
Evan Jones 86991f633d python docs: details are UTF-8 encodable, not just ASCII.
Context detail messages are Unicode strings in both the implementation and
specification. Fix the documentation to make this clearer. The
specification for the Status-Message response field says "Status-Message is
[...] a Unicode string [...] encoded as UTF-8" [1]. The implementation
seems to call _common.encode(), so anything that is UTF-8 encodable works.
For example:

    context.set_code(grpc.StatusCode.ABORTED)
    context.set_details('emoji error: \U0001F600')

Correctly returns a smiley face emoji to the client.
2019-03-18 10:59:18 -04:00
Jan Tattermusch 0f8a3aeeb7 install jq 2019-03-18 14:30:23 +01:00
Jan Tattermusch 472613c3bc check dotnet SDK version before building ASP.NET core interop image 2019-03-18 14:20:53 +01: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 797b01a85e Merge pull request #17760 from Norman0406/fix-interceptor_memory_leak
Fixing memory leak in interceptor by removing unsued send_status_
2019-03-16 10:14:19 -07:00