Ryan Beasley
d47f2d5cc9
include linux/tcp.h on Linux pre-glibc 2.17
...
Bazel 0.24.0 upgraded grpc from 1.13.0 to 1.18.0, and the latter makes use of
the TCP_USER_TIMEOUT socket option. Problem: grpc conditions the option on
the Linux kernel version but sources the option from glibc's `netinet/tcp.h`.
glibc != Linux kernel, and that option wasn't imported to glibc until 2.17.
We can't just build Bazel with glibc 2.17 because we still have to support
CentOS 6 dev nodes which ship with glibc 2.12. So instead this change
tweaks the grpc headers to conditionally include <linux/tcp.h> instead of
<netinet/tcp.h>.
Resolves https://github.com/grpc/grpc/issues/18728 .
2019-04-11 13:35:26 -07:00
Muxi Yan
f371fce887
Remove previous fix proposal proved to be wrong
2019-04-10 16:20:31 -07:00
Muxi Yan
bec72481b5
Fix thread safety issue
2019-04-10 16:19:13 -07:00
vishalpowar
894c4b1852
Merge pull request #18529 from vishalpowar/xds_lrs_code_gen
...
Add upb generated code and build rule for lrs protocol.
2019-04-10 13:22:42 -07:00
SataQiu
44f92cdd17
clean up repeated words
2019-04-10 16:25:25 +08:00
Nicolas Noble
58c894fb9e
Merge pull request #18694 from abmahdy/master
...
Disable Nagle algorithm in Windows
2019-04-09 23:55:41 -07:00
Yash Tibrewal
2378ddcd51
Add service config to call context
2019-04-09 22:23:10 -07:00
Yash Tibrewal
aa908cdd8d
Merge pull request #18556 from yashykt/unixpath
...
Explicitly call getsockname after accept for unix sockets to get the sun_path
2019-04-09 15:04:52 -07:00
Vishal Powar
df3d5bc8f7
Add upb generated code and build rule for lrs protocol.
2019-04-09 12:03:21 -07:00
Yash Tibrewal
2b7cab0d41
Remove check on error
2019-04-09 11:37:59 -07:00
Ahmed Mahdy
b4e94b652d
Fix formatting
2019-04-09 10:05:53 -07:00
Yash Tibrewal
917d025f03
Fix diff between num_entries and idx of path
2019-04-09 09:39:42 -07:00
Yash Tibrewal
74540483c6
Merge branch 'master' into svc_cfg1
2019-04-08 19:51:45 -07:00
Yash Tibrewal
960864736b
Unref errors in test
2019-04-08 19:51:20 -07:00
Ahmed Mahdy
1dce1009e6
Disable Nagle algorithm in Windows
2019-04-08 16:58:15 -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
Yash Tibrewal
b7f32af1d0
Fix scoping for service config errors
2019-04-05 19:17:29 -07:00
Juanli Shen
086820227f
Fix error message upon pick failure
2019-04-05 17:41:45 -07:00
Yash Tibrewal
3dc6eae912
Merge branch 'master' into svc_cfg1
2019-04-05 13:45:03 -07:00
Yash Tibrewal
327350ab39
ServiceConfig::Create expects non-Null error and better errors
2019-04-05 12:16:37 -07:00
Yihua Zhang
1fb7a84133
fix ALPN issues.
2019-04-05 10:23:29 -07:00
Yash Tibrewal
390078b7a8
Add tests for new service config mechanism
2019-04-04 18:58:15 -07:00
Yash Tibrewal
fbe3b3575f
Cleanup and continue parsing service config even if parser errors are received
2019-04-04 16:14:59 -07:00
Mark D. Roth
a8a166227b
Merge pull request #18636 from markdroth/health_check_client_use_after_free_bug
...
Fix health check client to wait for subchannel call stack destruction before destroying the arena.
2019-04-04 12:33:36 -07:00
Yash Tibrewal
c28f16e481
Reviewer comments
2019-04-04 12:26:26 -07:00
Mark D. Roth
4a19b2f45f
Add atomic to ensure we don't cancel twice.
...
Also convert existing seen_response_ to new atomic API.
2019-04-04 07:29:24 -07:00
Mark D. Roth
56d8f9896b
Merge pull request #18580 from markdroth/data_plane_combiner
...
Second attempt: Split data plane and control plane into their own combiners.
2019-04-04 07:24:17 -07:00
Yash Tibrewal
0f0e774722
Clean up
2019-04-03 19:05:40 -07:00
Yash Tibrewal
0c8ef41a5e
Remove smart pointers from global registry
2019-04-03 18:53:14 -07:00
Yash Tibrewal
9bfd2354ec
Add global and method parsing logic
2019-04-03 18:03:42 -07:00
Juanli Shen
5f13d8584e
Merge pull request #18629 from AspirinSJL/backport_pf_fix_1.20.x
...
Backport pick_first fix to v1.20.x
2019-04-03 16:20:11 -07:00
Michael Lumish
2f113fd0fc
Merge pull request #18633 from nicolasnoble/backports
...
Backports of 18445 and 18517.
2019-04-03 15:36:54 -07:00
Mark D. Roth
0e7ea67351
Fix health check client to wait for subchannel call stack destruction before destroying the arena.
2019-04-03 13:59:08 -07:00
Yash Tibrewal
c871a0bb32
Remove commented code
2019-04-03 13:34:39 -07:00
Yash Tibrewal
4d696c659e
Reviewer comments
2019-04-03 13:32:26 -07:00
Mark D. Roth
eccfecd6a6
Move functions for individual args out of channel_args.{h,cc}.
2019-04-03 13:15:40 -07:00
Nicolas "Pixel" Noble
f97b47c87c
Backports of 18445 and 18517.
2019-04-03 21:59:42 +02:00
Nicolas Noble
cb01297021
Merge pull request #18445 from nicolasnoble/last-memset-for-real-this-time
...
Taking care of a last few memsets.
2019-04-03 12:56:03 -07:00
Mark D. Roth
ebf4cc1dfa
Avoid crash in pick_first when invoking ExitIdleLocked() after shutdown.
2019-04-03 12:48:27 -07:00
Yash Tibrewal
4ac28e61f9
backport #18606 - Add a dummy function to grpc cfstream library
2019-04-03 12:34:53 -07:00
Mark D. Roth
9e841d1aff
Backport pick_first fix to v1.20.x
2019-04-03 10:57:25 -07:00
Nicolas "Pixel" Noble
81c6081a3e
Fixing failures.
2019-04-03 19:40:53 +02:00
Mark D. Roth
230c33ef14
Merge remote-tracking branch 'upstream/master' into data_plane_combiner
2019-04-03 07:00:27 -07:00
Mark D. Roth
a5389c4b29
Merge pull request #18476 from markdroth/c++_client_channel_external_watcher
...
Convert external connectivity watcher to C++.
2019-04-03 06:45:44 -07:00
Nicolas "Pixel" Noble
21d9436ca6
Merge branch 'master' of https://github.com/grpc/grpc into last-memset-for-real-this-time
2019-04-03 01:30:54 +02:00
Nicolas Noble
53a0cb7d36
Merge pull request #18517 from nicolasnoble/memset-breakout-2
...
Breakout of #18445 - part 2
2019-04-02 16:29:43 -07:00
Nicolas Noble
683c18306b
Merge pull request #18572 from grpc/revert-18475-fix-jwt
...
Revert "Fix compilation error in JWT using const_cast."
2019-04-02 16:28:54 -07:00
Mark D. Roth
adf5f87284
more code review changes
2019-04-02 15:16:29 -07:00
Mark D. Roth
89a9e9d1dd
code review changes
2019-04-02 14:33:11 -07:00
Mark D. Roth
c7dc6e55a6
Merge remote-tracking branch 'upstream/master' into c++_client_channel_external_watcher
2019-04-02 14:21:39 -07:00
Mark D. Roth
c48385894b
Merge pull request #18598 from markdroth/pick_first_stay_idle_on_empty_update
...
pick_first: don't go into TRANSIENT_FAILURE upon empty update when in IDLE
2019-04-02 14:07:07 -07:00
Muxi Yan
4a84747b07
Merge remote-tracking branch 'upstream/master' into fix-gettimeofday-oob
2019-04-02 08:35:40 -07:00
Yash Tibrewal
69bbf86d14
Add a dummy function to grpc cfstream library
2019-04-01 16:01:49 -07:00
yihuaz
ca471f6143
Merge pull request #18563 from yihuazhang/fix_alpn_issue
...
Fix ALPN check in gRPC C core SSL stack
2019-04-01 14:56:50 -07:00
Mark D. Roth
ee4e4bead3
pick_first: don't go into TRANSIENT_FAILURE upon empty update when in IDLE.
2019-04-01 14:55:29 -07:00
Muxi Yan
39b40cbccb
Add guard to the tv_nsec field of gpr_now return value
2019-04-01 13:37:35 -07:00
Yang Gao
681f1c8a98
Merge pull request #18583 from yang-g/pingping
...
Stop pinging if transport is closed
2019-04-01 12:06:57 -07:00
Soheil Hassas Yeganeh
31a27146f8
Merge pull request #18588 from soheilhy/h2-stream
...
Ref transport and stream before init of chttp2_stream structure.
2019-04-01 14:24:32 -04:00
Nicolas "Pixel" Noble
ffeb4bff6a
Merge branch 'master' of https://github.com/grpc/grpc into memset-breakout-2
2019-04-01 19:56:58 +02:00
Yihua Zhang
57caf78407
fix ALPN issues.
2019-04-01 08:48:35 -07:00
Soheil Hassas Yeganeh
c239e0416d
Initialize time as part of basic initialization.
...
`gpr_time_init` must happen in `do_basic_init`, because
for normal initialization we may need the precise clock
(e.g., if profilers are enabled).
Otherwise, we will have an stack overflow.
Fixes #18589
2019-03-31 20:18:13 -04:00
Soheil Hassas Yeganeh
da3a2320a2
Ref transport and stream before init of chttp2_stream structure.
...
The stream structure is really big and by the time we get to
ref the stream and the transport, the fields are out of cache.
We need to ref them immediately, before starting to initialize
the stream.
This commit introduces a 0-byte Reffer so that we can
ref the streams on time before the field initializers.
2019-03-30 22:29:12 -04:00
yang-g
47132c099e
error handling for start_bdp_ping
2019-03-29 21:45:12 -07:00
Lidi Zheng
1e8ddd7cda
Merge pull request #18584 from lidizheng/bump-version
...
Bump version to v1.21.0-dev
2019-03-29 17:50:13 -07:00
Yash Tibrewal
b2c773d26f
Global Registry for Service Config Parsers
2019-03-29 17:19:08 -07:00
Moiz Haidry
5e26c4339d
Merge pull request #18052 from mhaidrygoog/xds_work
...
Support for LocalityMap for XDS LB policy
2019-03-29 16:30:42 -07:00
Lidi Zheng
0231bf3b01
Regenerate projects
2019-03-29 16:24:50 -07:00
yang-g
55f9946d3b
Stop pinging if transport is closed
2019-03-29 16:19:21 -07:00
Mark D. Roth
96a26fdb0b
Use mutext to protect drop call counts in grpclb client stats.
2019-03-29 14:58:58 -07:00
Mark D. Roth
0b5ec20ce8
Revert "Merge pull request #18578 from grpc/revert-18437-data_plane_combiner"
...
This reverts commit a8477b421f , reversing
changes made to 65b25ce24d .
2019-03-29 13:55:51 -07:00
Moiz Haidry
ba00d3c914
Added a locality map class that maintains a child policy per locality. This is used by the xds lb policy to manage multiple localities. Also added a grpc_core::Map which is a templatized map, that is used by the locality map to maintain this info
2019-03-29 12:50:54 -07:00
Mark D. Roth
7e3b8d38ff
Revert "Split data plane and control plane into their own combiners."
2019-03-29 12:12:28 -07:00
Nicolas Noble
b400a6bf20
Revert "Fix compilation error in JWT using const_cast."
2019-03-29 10:29:45 -07:00
Yash Tibrewal
685372f61e
Close fd if error on getsockname
2019-03-28 14:22:39 -07:00
Mark D. Roth
59cb5193f9
Split data plane and control plane into their own combiners.
2019-03-28 07:54:25 -07:00
Yash Tibrewal
282702d080
Explicitly call getsockname after accept for unix sockets to get the sun_path
2019-03-27 18:13:58 -07:00
Yash Tibrewal
9dede0f029
Merge pull request #18462 from yashykt/execctxfork
...
Remove unnecessary else condition
2019-03-27 14:29:34 -07:00
rmstar
2e2cecebbf
Merge pull request #18381 from rmstar/concurrentrequests
...
Fix bug in CFStream endpoint
2019-03-27 14:19:14 -07:00
Soheil Hassas Yeganeh
4ef6a27427
Merge pull request #18545 from soheilhy/tcp-win-null-deref
...
Fix a NULL deref in tcp_client_windows.cc
2019-03-27 15:50:40 -04:00
Guantao Liu
ad55cf8900
Merge pull request #18501 from guantaol/avoid_executor
...
Avoid using grpc_core::Executor when the background poller is available
2019-03-27 12:28:48 -07:00
Mark D. Roth
934e31d7d1
Merge pull request #18357 from markdroth/address_list_not_in_channel_args
...
Restructure how addresses and service config are passed from resolver to LB policy
2019-03-27 11:40:44 -07:00
Soheil Hassas Yeganeh
b0e75a42d2
Fix a NULL deref in tcp_client_windows.cc
...
`grpc_sockaddr_to_uri(addr)` can return nullptr, and we are directly
passing it to grpc_slice_from_copied_string. Clusterfuzz found this
issue in https://clusterfuzz.com/testcase-detail/5188592759603200
Use "NULL" when target URI is nullptr, to avoid null deref.
Fixes 18544
2019-03-27 14:12:33 -04:00
Prashant Jaikumar
4e9e662729
Fixed bug in CFStream endpoint.
...
We were failing to return an error when the transport tried to write to an endpoint that was in an errored state.
2019-03-26 18:36:44 -07:00
Yash Tibrewal
59ffdd9929
Merge pull request #18491 from yashykt/httpclosuresched
...
Use GRPC_CLOSURE_SCHED instead of GRPC_CLOSURE_RUN in complete_closure_step
2019-03-26 17:45:28 -07:00
Guantao Liu
b3c8d918d1
Merge remote-tracking branch 'upstream/master' into avoid_executor
2019-03-26 15:56:29 -07:00
Soheil Hassas Yeganeh
65ec942940
Merge pull request #18475 from soheilhy/fix-jwt
...
Fix compilation error in JWT using const_cast.
2019-03-26 17:13:33 -04:00
Mark D. Roth
206592ce9c
Restructure how addresses and service config are passed from resolver to LB policy.
2019-03-26 11:57:21 -07:00
Nicolas "Pixel" Noble
9ff845961e
Breakout of #18445 - part 2
2019-03-26 19:21:18 +01:00
Nicolas "Pixel" Noble
9518dd85c5
Merge branch 'master' of https://github.com/grpc/grpc into last-memset-for-real-this-time
2019-03-26 19:05:15 +01:00
Nicolas Noble
4e1a89c78c
Merge pull request #18495 from grpc/forgotten-csharp
...
Adding missing language :P
2019-03-25 18:09:50 -07:00
Guantao Liu
53065db366
Clang formatting
2019-03-25 16:23:19 -07:00
Guantao Liu
872d2787a0
Avoid using grpc_core::Executor when the background poller is available.
...
Instead, run closures in the background poller. This will generally
avoid the thread hop in the gRPC runtime.
2019-03-25 16:19:08 -07:00
Nicolas "Pixel" Noble
55e280b7a5
Breakout of #18445 - part 1
2019-03-25 23:20:57 +01:00
Nicolas Noble
c9b7ca8e24
Adding missing language :P
2019-03-25 13:44:45 -07:00
vishalpowar
d673764a61
Merge pull request #18478 from vishalpowar/xds_cds_upb_generate
...
Generate upb code for cds protos and BUILD rule changes
2019-03-25 12:48:09 -07:00
Yash Tibrewal
8ef8d912a7
Use GRPC_CLOSURE_SCHED instead of GRPC_CLOSURE_RUN in complete_closure_step
2019-03-25 11:51:14 -07:00
Yash Tibrewal
820d75eaf4
Merge pull request #18481 from yashykt/http2bug
...
Remove unnecessary hack which causes data races
2019-03-25 00:22:54 -07:00
Yash Tibrewal
9effda48bf
Merge pull request #18482 from yashykt/http2bug2
...
Fix Potentially Dangerous Typo - locked function being run outside of combiner
2019-03-25 00:20:39 -07:00
Soheil Hassas Yeganeh
a3366c1b7f
Merge pull request #18464 from soheilhy/slice-buffer
...
Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
2019-03-23 22:42:23 -04:00
Soheil Hassas Yeganeh
e5bef12065
Merge pull request #18474 from soheilhy/h2-incoming-md
...
Preallocate for incoming metadatas.
2019-03-23 04:59:32 -04:00
Soheil Hassas Yeganeh
fc2fc03fc3
Merge pull request #18473 from soheilhy/stack-const-ref
...
Use const ref for `grpc_slice`
2019-03-23 04:58:19 -04:00
Vishal Powar
e959373742
Generate upb code for cds protos and BUILD rule changes
2019-03-22 19:40:08 -07:00
Yash Tibrewal
072749b38c
Reviewer comments
2019-03-22 16:58:14 -07:00
Yash Tibrewal
65e266b47f
Locked function needs to be run inside a combiner
2019-03-22 16:38:50 -07:00
Yash Tibrewal
eab66cb6cc
Remove unused function
2019-03-22 16:08:11 -07:00
Yash Tibrewal
c9e1a71c8e
Remove unnecessary hack which causes data races
2019-03-22 16:05:04 -07:00
Mark D. Roth
f26ef91c98
Convert external connectivity watcher to C++.
2019-03-22 08:26:10 -07:00
yihuaz
b25024136a
Merge pull request #18469 from yihuazhang/revert_ssl_security_connector
...
Revert the changes in ssl_security_connector.cc made in #18115
2019-03-22 08:21:04 -07:00
Soheil Hassas Yeganeh
5534fb2e23
Fix compilation error in JWT using const_cast.
...
I got this error on an unrelated patch, and I believe the Distribution
Test is broken:
/var/local/git/grpc/src/core/lib/security/credentials/jwt/jwt_verifier.cc:628:57: error: invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'unsigned char*' [-fpermissive]
GRPC_SLICE_LENGTH(signature)) != 1) {
^
In file included from /usr/include/openssl/pem.h:69:0,
from /var/local/git/grpc/src/core/lib/security/credentials/jwt/jwt_verifier.cc:35:
/usr/include/openssl/evp.h:642:5: note: initializing argument 2 of 'int EVP_DigestVerifyFinal(EVP_MD_CTX*, unsigned char*, size_t)'
int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, unsigned char *sig, size_t siglen);
2019-03-22 06:59:12 -04:00
Soheil Hassas Yeganeh
1014fe507f
Use const ref for grpc_slice.
...
We are copying the slice on every call creation, which is hurting
ping/pong traffic.
2019-03-22 06:38:33 -04:00
Soheil Hassas Yeganeh
88fe29c63d
Preallocate for incoming metadatas.
...
There is usually 9 metadata in incoming headers. We are calling
arena_alloc for all of them and that accounts for 75% of the
calls to arena_alloc.
Simply preallocate 10 of them in the structure so that we can
avoid the atomic op, per header.
2019-03-22 06:27:33 -04:00
vishalpowar
62ba0b89b1
Merge pull request #18425 from vishalpowar/xds_ads_upb_generate
...
Add generated upb code for endpoints information.
2019-03-21 22:46:51 -07:00
Vishal Powar
fb15daf8b9
Add generated upb code for endpoints information.
...
Also,
- Update upb submodule for new code generator and update generated
files.
2019-03-21 17:24:57 -07:00
Yihua Zhang
a176a07c02
revert the SSL TSI changes
2019-03-21 16:38:16 -07:00
Yihua Zhang
f022233c4d
fix sanity check
2019-03-21 16:01:57 -07:00
Yihua Zhang
0a51130936
revert the changes in ssl_security_connector
2019-03-21 15:35:29 -07:00
Nicolas Noble
0045a22101
Merge pull request #18443 from guzt/fuchsia_gn
...
Add Fuchsia support.
2019-03-21 13:00:27 -07:00
Mark D. Roth
4222ba53d7
Merge pull request #17987 from markdroth/resolver_api
...
Add ResultHandler to Resolver API
2019-03-21 10:26:04 -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
Yash Tibrewal
3954b3ef5d
Remove unnecessary else condition
2019-03-20 17:37:36 -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
Nicolas "Pixel" Noble
4a8b39e7ab
Merge branch 'master' of https://github.com/grpc/grpc into last-memset-for-real-this-time
2019-03-20 21:48:34 +01: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
Arjun
ca69f911a7
Add initial Fuchsia support.
...
1. Add a BUILD.gn file
2. Support fuchsia as a platform
This is heavily based on the changes in https://fuchsia.googlesource.com/third_party/grpc/
2019-03-20 10:26:49 -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 "Pixel" Noble
9c7a0c01ed
Taking care of a last few memsets.
2019-03-20 05:15:25 +01:00
Yihua Zhang
235fa49055
fail-fast if no pem root certs are available.
2019-03-19 18:38:08 -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
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
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
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
Mark D. Roth
233d3e27ff
grpclb fallback-at-startup improvements
2019-03-18 13:40:23 -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
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
Mark D. Roth
adc2163038
Go into fallback mode when losing contact with balancer and backends.
2019-03-18 09:08:38 -07:00
apolcyn
ee72c63837
Merge pull request #18384 from apolcyn/log_more_query_status
...
Trace log the status of every c-ares lookup; cleanup error handling
2019-03-15 16:50:47 -07:00
Nicolas "Pixel" Noble
957f674fff
Removing a few more non-trivial struct memsets, part 3.
2019-03-15 23:29:00 +01:00
yihuaz
4fef7f4d13
Merge pull request #18400 from yihuazhang/SPIFFE_FIX_CLANG_TIDY_ERROR
...
Fix clang-tidy errors in SPIFFE security stack
2019-03-15 14:47:48 -07:00
Vishal Powar
f569cc1b36
Add BUILD rul and generated upb code for protos required to do DiscoveryRequest to xDS server
...
Also,
- cleanup check scripts to look for file extension to exempt upb
generated code.
2019-03-15 14:16:08 -07:00
Juanli Shen
335ced6b79
Improve logging
2019-03-15 13:30:31 -07:00
Alexander Polcyn
c02034eb96
Add more tracing around the status of each c-ares query; refactor error
...
handling
2019-03-15 13:17:37 -07:00
Juanli Shen
78fc00f0ce
Fix reresolution condition in grpclb
2019-03-15 13:16:18 -07:00
Yihua Zhang
64caf4d3df
fix clang-tidy errors
2019-03-15 12:57:25 -07:00
Yash Tibrewal
cbca7b6b00
Merge pull request #18367 from yashykt/errqueueinit
...
Use GRPC_LINUX_ERRQUEUE
2019-03-15 12:51:12 -07:00
Michael Lumish
afdf67c7b1
Merge pull request #18391 from nicolasnoble/non-trivial-memset
...
Removing a few more non-trivial struct memsets.
2019-03-15 12:21:52 -07:00
yihuaz
a3cc5361e6
Merge pull request #18115 from yihuazhang/SPIFFE_SECURITY_CONNECTOR
...
Add SPIFFE security stack to gRPC
2019-03-15 10:31:17 -07:00
Nicolas "Pixel" Noble
a5e0fe95e8
Removing a few more non-trivial struct memsets.
...
This structure (tsi_ssl_client_handshaker_options) has an explicit constructor that sets everything to zeroes.
2019-03-15 17:31:46 +01:00
Nicolas Noble
c28d35dc1c
Merge pull request #18380 from nicolasnoble/memset-on-nontrivial
...
Fix a memset on a non-trivial object.
2019-03-14 21:04:53 -07:00
Nicolas "Pixel" Noble
8479bed4b5
Removing superfluous const in a static_cast.
...
This seems to be producing a warning on some compilers, and it's unnecessary anyway.
2019-03-15 01:01:29 +01:00
Nicolas "Pixel" Noble
32b9e52453
Fix a memset on a non-trivial object.
2019-03-15 00:47:15 +01:00
Yihua Zhang
b017c801b6
Add SPIFFE security stack to gRPC core
2019-03-14 15:24:48 -07:00
Mark D. Roth
d069bc7721
LB policy API cleanup
2019-03-14 12:19:09 -07:00
Yash Tibrewal
efe0b4b2dd
Use GRPC_LINUX_ERRQUEUE
2019-03-14 12:04:05 -07:00
vishalpowar
2ed58ad449
Merge pull request #18258 from vishalpowar/upb_build_new
...
Add upb generated protos and build it with required upb build changes
2019-03-14 10:15:27 -07:00
Vishal Powar
319fcdf26e
Add a script for generating C code and build rule for protobuf protos.
...
All these changes need to go together to make sense
- changes to use new version of upb in bazel
- allowing includes in build target option
- script for generating c code (upb) for protos
- generated code for example protos
- adding changes for non-bazel builds
- change sanity tests to ignore the generated files.
2019-03-13 12:53:17 -07:00
Mark D. Roth
687580fe04
Add ResultHandler to Resolver API.
2019-03-13 07:43:41 -07:00
Soheil Hassas Yeganeh
91da938053
Make the TCP_INQ log a debug entry.
...
Users reported they see a lot of these logs in their runs.
2019-03-13 09:29:52 -04:00
frazenshtein
c792aae328
Removed grpc_wsa_socket_flags variable from the header, renamed to s_wsa_socket_flags
2019-03-13 10:29:41 +03:00
Mark D. Roth
c9421eeb85
Fix state reported by pick_first when we receive a GOAWAY with a pending subchannel list.
2019-03-12 13:15:45 -07:00
frazenshtein
b325410141
Added grpc_get_default_wsa_socket_flags()
2019-03-12 18:17:09 +03:00
Yang Gao
c5311260fd
Merge pull request #18284 from yang-g/fuzzer
...
Fix fuzzer test
2019-03-08 20:19:34 -08:00
Juanli Shen
34aa714644
Remove pollset_set when resetting LB policies
2019-03-08 15:37:09 -08:00
yang-g
919dc4cd2c
Add comment
2019-03-08 10:04:59 -08:00
Mark D. Roth
aa94bab589
Merge pull request #18295 from markdroth/client_channel_tracer_split
...
Split client_channel tracer into two.
2019-03-08 09:16:34 -08:00
Soheil Hassas Yeganeh
0031393a17
Merge pull request #18240 from soheilhy/tcp-inq
...
Implement TCP_INQ for gRPC in Linux
2019-03-08 11:29:39 -05:00
Yash Tibrewal
4f8891c3e5
Merge branch 'master' into deletepollcv
2019-03-07 17:57:14 -08:00
Yash Tibrewal
6b45cea2f0
Remove from poll-cv comments too
2019-03-07 17:56:49 -08:00
Yash Tibrewal
abcd5861eb
Nuking the poll-cv polling engine
2019-03-07 14:49:24 -08:00
Mark D. Roth
8878712aeb
Split client_channel tracer into two.
2019-03-07 13:02:04 -08:00
Juanli Shen
d15605c0e5
Swap in new LB policy when it's ready
2019-03-07 12:42:51 -08:00
Mark D. Roth
827c77bd24
Use fallback before timeout if balancer channel reports TRANSIENT_FAILURE.
2019-03-07 07:57:29 -08:00
Soheil Hassas Yeganeh
18b19105f2
Implement TCP_INQ for gRPC in Linux
...
TCP_INQ is a socket option we added to Linux to report pending bytes
on the socket as a control message.
Using TCP_INQ we can accurately decide whether to continue read or not.
Add an urgent parameter, when we do not want to wait for EPOLLIN.
This commit improves the latency of 1 RPC unary (minimal benchmark)
significantly:
Before:
l_50: 61.3584984733
l_90: 94.8328711277
l_99: 126.211351174
l_999: 158.722406029
After:
l_50: 51.3546011488 (-16%)
l_90: 72.3420731581 (-23%)
l_99: 103.280218974 (-18%)
l_999: 130.905689996 (-17%)
2019-03-06 22:15:53 -05:00
yang-g
a6596b2fd5
Fix fuzzer test
2019-03-06 15:43:12 -08:00
Mark D. Roth
12e6b4b89e
Merge pull request #18278 from markdroth/grpclb_child_policy_configurable
...
Make grpclb work when selected via service config with no balancer addresses.
2019-03-06 13:13:59 -08:00
Mark D. Roth
eb41c10240
Merge pull request #18251 from markdroth/lb_config_includes_name
...
Store LB policy name in Config object.
2019-03-06 12:50:31 -08:00
Mark D. Roth
d85e6f4e94
Make grpclb work when selected via service config with no balancer addresses.
2019-03-06 11:16:56 -08:00
Mark D. Roth
2bd7ad0112
Merge pull request #18263 from markdroth/grpclb_child_policy_configurable
...
Second attempt: Make grpclb child policy configurable
2019-03-06 07:34:17 -08:00
Yang Gao
d607a1e8a3
Merge pull request #18261 from yang-g/fuzzer
...
Unref raw slice as well when gzip fails
2019-03-05 22:12:12 -08:00
Juanli Shen
cd15e147e3
Merge pull request #18021 from AspirinSJL/real_resolver
...
Use real resolver in xds lb channel
2019-03-05 16:18:32 -08:00
Mark D. Roth
49c6d5044b
Add lock for channelz access outside of the combiner.
2019-03-05 14:46:16 -08:00
yang-g
8369b05529
Fix a memory leak
2019-03-05 14:31:55 -08:00
Mark D. Roth
6d75cfe426
Revert "Merge pull request #18254 from grpc/revert-18078-grpclb_child_policy_configurable"
...
This reverts commit 6dcf6d1645 , reversing
changes made to a2f1e924de .
2019-03-05 14:18:01 -08:00
Mark D. Roth
6dcf6d1645
Merge pull request #18254 from grpc/revert-18078-grpclb_child_policy_configurable
...
Revert "Make grpclb child policy configurable"
2019-03-05 14:17:25 -08:00
Juanli Shen
e889fda482
Use real resolver in xds lb channel
2019-03-05 13:29:55 -08:00
Mark D. Roth
9febbf2d92
Revert "Make grpclb child policy configurable"
2019-03-05 11:32:00 -08:00
Soheil Hassas Yeganeh
c060d55cc7
Revert "Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing."
2019-03-05 14:01:01 -05:00
Mark D. Roth
840e7a2861
Store LB policy name in Config object.
2019-03-05 07:28:32 -08:00
Mark D. Roth
762676249e
Make grpclb child policy configurable.
2019-03-05 06:32:03 -08:00
Yash Tibrewal
b52bac7888
Merge pull request #18235 from soheilhy/tcp-closure
...
Initialize tcp->read_done_closure only once
2019-03-04 16:00:11 -08:00
Mark D. Roth
51e718283e
Merge pull request #18094 from markdroth/subchannel_call_context_fix
...
Don't use a separate call context for subchannel calls
2019-03-04 15:49:26 -08:00
Mark D. Roth
a04b0646de
Don't use a separate call context for subchannel calls.
2019-03-04 14:38:02 -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
Mark D. Roth
5b2361cbab
Merge pull request #18208 from markdroth/grpclb_balancer_channel_no_connectivity_watch
...
Don't to try to watch connectivity state of grpclb balancer channel.
2019-03-04 10:33:21 -08:00
Mark D. Roth
be6f195823
Merge pull request #18215 from markdroth/xds_client_side_health_checking
...
Inhibit client-side health checking for backends from balancer in xds.
2019-03-04 09:58:37 -08:00
Soheil Hassas Yeganeh
dcc5728ddf
Initialize tcp->read_done_closure only once
...
We are initializing the closure every time in tcp_notify_on_read()
wasting cycles.
2019-03-04 12:26:13 -05:00
Soheil Hassas Yeganeh
8898f48277
Avoid copying grpc_slice as much as possible.
...
Passing grpc_slice by value and/or returning it can be very costly,
introducing many extra instructions to push the structure to the
stack and poping it.
This CL, wherever possible, changes grpc_slice to be passed by
value.
On a local benchmark, I obserse 4-7% improvements in latency and QPS.
There are still copies to the slice_ref vtable which @arjunroy
is fixing as part of his major effort to use grpc_core::RefCount
for slices and devirtualizing them.
2019-03-02 22:29:44 -05:00
Mark D. Roth
8d9982c1f8
Fix gpr_once initialization.
2019-03-01 15:14:55 -08:00
Mark D. Roth
251d66aac6
Convert client channel factory to C++
2019-03-01 08:40:21 -08:00
Mark D. Roth
1c52c30991
Inhibit client-side health checking for backends from balancer in xds.
2019-03-01 07:44:23 -08:00
Mark D. Roth
9e811bef4d
Don't to try to watch connectivity state of balancer channel.
2019-02-28 15:44:09 -08:00
Yash Tibrewal
7b63731b87
Merge pull request #18196 from yashykt/logging1
...
Print the peer string to make debugging easier
2019-02-28 09:05:05 -08:00
Nicolas Noble
0fc01a302f
Merge pull request #18171 from huynq0911/fix_duplicated_word
...
Fix some typos
2019-02-27 19:15:53 -08:00
Yang Gao
40241c5236
Merge pull request #18157 from yang-g/rollbackrollback
...
Roll-forward PR17308
2019-02-27 17:04:19 -08:00
Yash Tibrewal
80f1eb57af
Add peer string to ping sent log
2019-02-27 16:15:29 -08:00
Yash Tibrewal
030149df8f
Print the peer string, instead of the address of the peer string
2019-02-27 16:07:01 -08:00
Mark D. Roth
3be45a5682
Merge pull request #18176 from tzik/msvc_fix
...
Remove no-effect std::move() that causes MSVC warning
2019-02-27 10:22:35 -08:00
Soheil Hassas Yeganeh
05d1d03fbd
Merge pull request #18163 from soheilhy/worktree-h2
...
Run run_after_write closures in h2 once write action is done.
2019-02-27 00:08:42 -05:00
tzik
e94a11482a
Use GRPC_ABSTRACT
2019-02-27 13:03:18 +09:00
Soheil Hassas Yeganeh
6a78ba71a6
Merge pull request #18067 from soheilhy/cq-cas
...
Use std::atomic for CQ data.
2019-02-26 22:08:07 -05:00
Soheil Hassas Yeganeh
ebe996f2fe
Merge pull request #18147 from soheilhy/worktree-slice-malloc
...
Convert grpc malloc slice to use grpc_core::RefCount.
2019-02-26 22:07:23 -05:00
Soheil Hassas Yeganeh
1027149f8d
Run run_after_write closures in h2 once write action is done.
...
We flush these closures only when the connection goes IDLE.
This will cause no completion being sent, if we have a continuous
stream of bytes that never stops, causing a memory bloat because
we never call the callbacks of the ops.
For example, we use 100s of GiB of memory after a minute of exchanging
1MiB RPCs with callback API.
This patch runs the closures when we have done running
one write action.
After this change memory remains stable for the 1MiB benchmark.
QPS is increased by 200 QPS (520 -> 749), and latency is dropped
by 70ms, because we were basically page-faulting on every RPC.
2019-02-26 17:39:38 -05:00
billfeng327
1e4b706068
used universal header file
2019-02-26 12:51:54 -08:00
billfeng327
b9d784338d
Merge branch 'master' into update-deps-version
2019-02-26 10:39:15 -08:00
billfeng327
0eaa2cd6bd
added selective header inclusion for Windows
2019-02-26 10:28:18 -08:00
Taiju Tsuiki
79f4b4cba6
Lint fix for NOLINT
2019-02-27 02:12:38 +09:00
tzik
715e18fbef
Suppress clang-tidy
2019-02-26 22:05:42 +09:00
frazenshtein
6698cf87b3
Single instances of the grpc_wsa_socket_flags
2019-02-26 15:41:11 +03:00
frazenshtein
6e07d04c92
Fixed silly error
2019-02-26 13:48:28 +03:00
frazenshtein
0b96d0f711
Check once that WSA_FLAG_NO_HANDLE_INHERIT is supported
2019-02-26 12:13:18 +03:00
tzik
0f6a3d0a7c
Remove no-effect std::move() that causes MSVC warning
...
In C++17 mode of MSVC, std::move() has nodiscard attribute, and causes
a warning if its result is unused.
2019-02-26 18:02:53 +09:00
Nguyen Quang Huy
c9acd8380f
Fix some typos
...
Correct some words spelling for reading more easily.
2019-02-26 15:46:13 +07:00
yang-g
e5509e36d6
Prevent overflow
2019-02-25 16:12:25 -08:00
Yang Gao
4bccb4c5fd
Merge pull request #18153 from yang-g/ares
...
Avoid calling ares_library_init and ares_library_cleanup except for w…
2019-02-25 13:32:31 -08:00
yang-g
b003ae6eb9
Update comment
2019-02-25 11:23:56 -08:00
yang-g
8259bc25ce
fix format
2019-02-25 10:43:26 -08:00
yang-g
4adf0b1aae
Reproduce #18120
2019-02-25 10:15:57 -08:00
yang-g
456f748b2f
Revert "Merge pull request #18146 from grpc/revert-17308-shutdown"
...
This reverts commit 9079e98dfc , reversing
changes made to 76a38bfcc2 .
2019-02-25 10:11:06 -08:00
yang-g
7afcb32650
Avoid calling ares_library_init and ares_library_cleanup except for windows
2019-02-25 09:30:37 -08:00
Vijay Pai
c924e0b63e
Merge pull request #18136 from vjpai/callback_test_interceptor
...
Increase test scenarios for client-side of callback API plus fix exposed bugs
2019-02-25 09:25:59 -08:00
Mark D. Roth
c9aebe3880
Merge pull request #18081 from markdroth/service_config_ref_counted
...
Make service config ref-counted and hold refs to it in LB config.
2019-02-25 07:32:12 -08:00
Soheil Hassas Yeganeh
2c32f29802
Merge pull request #18148 from soheilhy/atomic-fix-hdr
...
Add missing header to gprpp/atomic.h
2019-02-25 10:13:39 -05:00
frazenshtein
bc7203e371
Fixed style
2019-02-25 12:19:41 +03:00
Vijay Pai
23f39363c4
Inproc: properly handle send message that won't go to other side
2019-02-25 00:02:08 -08:00
Soheil Hassas Yeganeh
6bde9122a7
Add missing header to gprpp/atomic.h
...
I missed to include atm.h for the stat macros.
2019-02-22 22:02:34 -05:00
Soheil Hassas Yeganeh
b4e069a5c3
Convert grpc malloc slice to use grpc_core::RefCount.
...
This shows up in profiles. Using grpc_core::RefCount lowers the time
spent in grpc_slice_malloc_large() by 8%.
2019-02-22 21:55:14 -05:00
Yang Gao
4bc2ca4de6
Revert "Move grpc_shutdown internals to a detached thread"
2019-02-22 16:34:24 -08:00
Mark D. Roth
e40177fad0
Make service config ref-counted and hold refs to it in LB config.
2019-02-22 16:33:50 -08:00
Yang Gao
dc3aadb6a5
Revert "Fix-forward: avoid data race on detached thread deletion"
2019-02-22 15:25:59 -08:00
Soheil Hassas Yeganeh
9dd94ea1fa
Use std::atomic for CQ data.
...
There was a sub-optimality in the CAS operation. vjpai@ and
I decided to move to std::atomic.
This commit basically moves CQ data to C++ structures, and
makes grpc_cq_event_queue a proper c++ class called CQEventQueue.
2019-02-22 14:53:29 -05:00
Mark D. Roth
428fa7602c
Transition into state CONNECTING when we start name resolution.
2019-02-22 10:31:16 -08:00
Mark D. Roth
5f00cfd3bd
Merge pull request #18096 from markdroth/lb_policy_api
...
Second attempt: LB policy picker API
2019-02-22 10:10:43 -08:00
Mark D. Roth
148ae20e44
Code review changes.
2019-02-22 07:36:18 -08:00
Mark D. Roth
523e537368
Start connectivity watches before updating connectivity state.
2019-02-21 14:01:38 -08:00
Mark D. Roth
624fb64f61
LB policy ctors no longer perform updates; UpdateLocked() must be called
...
after construction.
2019-02-21 14:01:22 -08:00
frazenshtein
b74044a67d
Use LPWSAPROTOCOL_INFO instead of LPWSAPROTOCOL_INFOA
2019-02-21 19:47:38 +03:00
frazenshtein
39f562e2b7
Define WSA_FLAG_NO_HANDLE_INHERIT if it's not defined
2019-02-21 19:27:09 +03:00
frazenshtein
76e9d1add7
Set WSA_FLAG_NO_HANDLE_INHERIT flag wherever the WSASocket is used.
...
Check WSA_FLAG_NO_HANDLE_INHERIT is supported.
2019-02-21 19:20:34 +03:00
Vijay Pai
d770e265ee
Fix-forward to avoid TSAN race on detached thread deletion
2019-02-20 22:57:16 -08:00
Vijay Pai
e60c4fc034
Merge pull request #18114 from equinox1993/master
...
Remove extra semicolons after function definitions
2019-02-20 21:40:26 -08:00
Soheil Hassas Yeganeh
2bb92f6a98
Merge pull request #18059 from soheilhy/worktree-cpp-atomic
...
Introduce more helper methods in gprpp/atomic.h
2019-02-20 22:28:17 -05: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
rmstar
22109adedd
Merge pull request #18082 from rmstar/cfstreamtestv2
...
Re-add cfstream_test
2019-02-20 15:38:51 -08:00
Yang Gao
b03e014ad8
Merge pull request #17308 from yang-g/shutdown
...
Move grpc_shutdown internals to a detached thread
2019-02-20 15:37:18 -08:00
Yang Gao
193293c590
Merge pull request #18110 from yang-g/malloc
...
Use malloc/free in leak checker
2019-02-20 15:35:50 -08:00
Vijay Pai
42c512c43e
Use atm operations on gpr_atm variables
2019-02-20 11:29:50 -08:00
yang-g
227cce9ad3
Use malloc/free in leak checker
2019-02-20 11:27:59 -08:00
Soheil Hassas Yeganeh
0800ce5976
Move all helper functions to a class called Atomic.
2019-02-20 12:53:59 -05:00
yang-g
cedc76bf38
Resolve comments
2019-02-20 08:45:31 -08:00
Soheil Hassas Yeganeh
1ccdb0ee26
Alias std::memory_order as grpc_core::MemoryOrder.
2019-02-20 11:42:33 -05:00
Kim Bao Long
0203bf74f5
Remove the redundant words in comments
...
Although it is spelling mistakes, it might make an affects while reading docs.
Co-Authored-By: Nguyen Phuong An <AnNP@vn.fujitsu.com>
Signed-off-by: Kim Bao Long <longkb@vn.fujitsu.com>
2019-02-20 16:21:59 +07:00
yang-g
fe3555f0fd
Merge with head and resolve conflict
2019-02-19 20:46:51 -08:00
Vijay Pai
318c67782a
Merge pull request #18097 from equinox1993/master
...
Move thread body logic into a private static method
2019-02-19 18:39:09 -08:00
Yuwei Huang
72035e7265
Move thread body logic into a private static method
...
Clang doesn't support adapting calling convention when converting a
non-capturing lambda into a function pointer, and it doesn't
support tagging a lambda with calling convention AFAICT. In
thd_windows.cc, we create the thread body lambda and pass it to
CreateThread(), which fails to build on clang because it cannot
convert the lambda into stdcall function. Note that this bug only
happens when building for x32 architecture. x64 is not affected because
there is only one standard x64 calling convention.
This change fixes this by moving the thread body logic into a private
static method and tagging it with WINAPI (which expands to __stdcall).
2019-02-19 13:58:26 -08:00
apolcyn
69b2d57042
Merge pull request #18084 from apolcyn/fix_ares_windows_with_logging
...
Fix c-ares on Windows "DNS resolution failure" triggered by logging
2019-02-19 13:55:58 -08:00
Mark D. Roth
aa149fedbb
Revert "Merge pull request #18093 from grpc/revert-17770-lb_policy_picker_api"
...
This reverts commit f327b83706 , reversing
changes made to b3b5d63423 .
2019-02-19 13:19:24 -08:00
hcaseyal
275296c594
Revert "LB policy picker API"
2019-02-19 11:05:52 -08:00
Alex Polcyn
0f794e1e3c
Fix c-ares on Windows bug triggered by tracing
2019-02-19 08:34:09 -08:00
Soheil Hassas Yeganeh
b3b5d63423
Merge pull request #17931 from soheilhy/channelz-threshold-fix
...
Fix an issue upon setting kEmptinessTheshold.
2019-02-16 20:51:08 -05:00
yang-g
298cb4ed90
Fix windows build
2019-02-15 22:29:13 -08:00
yang-g
0df63d3c98
Merge branch 'master' into shutdown
2019-02-15 21:51:03 -08:00
yang-g
6b67506bae
Add back tracked
2019-02-15 21:50:39 -08:00
Soheil Hassas Yeganeh
db38d4ca9b
Merge pull request #17939 from vertextao/gpr_mu_cv-leak-test
...
Add ASAN-only leak detection for gpr_mu/cv and fix the newly caught leaks
2019-02-15 21:43:32 -05:00
yang-g
86b23adc7f
Other comments
2019-02-15 16:26:31 -08:00
yang-g
3c61849461
python changes
2019-02-15 15:48:52 -08:00
Prashant Jaikumar
1ee4706c7d
Fixed cast in endpoint_cfstream.cc
2019-02-15 15:05:38 -08:00
Vijay Pai
0c1b8f91a0
Merge pull request #17971 from KeithMoyer/master
...
Fix tautological comparison
2019-02-15 13:10:11 -08:00
xtao
7260eb62ff
use static_cast to convert type instead of explicit type casting.
2019-02-16 00:00:51 +08:00
xtao
7766912dda
fix more detected mu/cv leaks
2019-02-16 00:00:50 +08:00
xtao
902820a5de
1) fix the asan tests caught leaks;
...
2) fix the tsan tests caught data races;
2019-02-16 00:00:50 +08:00
xtao
c03496fdac
1) remove unnecessary initialization;
...
2) correct comment grammar issue;
3) fix the newly caught leaks;
2019-02-16 00:00:50 +08:00
xtao
fb3b85a81a
1) Add MACRO GPR_HAS_FEATURE; 2) Add test code within GRPC_ASAN_ENABLED for gpr_mu/cv mem-leak detection.
2019-02-16 00:00:49 +08:00
Soheil Hassas Yeganeh
508c8d805a
Introduce more helper methods in gprpp/atomic.h
...
Retire the old atomic_with_atm.h and atomic_with_std.h as they are not
needed anymore.
Introduce helper methods which call GPR_ATM_INC_ADD_THEN and
GPR_ATM_INC_CAS_THEN, and use them everywhere.
Also introduce AtomicIncrementIfNonzero, originally authored by
vjpai@. This is going to be used for completion queues.
2019-02-15 10:31:12 -05:00
Vijay Pai
f57a224f79
Merge pull request #18069 from grpc/revert-17872-cfstream_test
...
Revert "Add test for network transitions when CFStream is enabled"
2019-02-14 21:58:28 -08:00
Jiangtao Li
91a10775c4
Merge pull request #18062 from jiangtaoli2016/handshaker_factory
...
Clean up deprecated tsi_create_ssl_server_handshaker_factory callers
2019-02-14 19:11:06 -08:00
jiangtaoli2016
f5a71f7313
Clean up deprecated tsi_create_ssl_server_handshaker_factory callers
2019-02-14 17:18:21 -08:00
Vijay Pai
03de98d5ef
Revert "Add test for network transitions when CFStream is enabled"
2019-02-14 15:35:44 -08:00
yang-g
545c555d31
Rename new public API
2019-02-14 14:22:40 -08:00
Juanli Shen
6c3827cb0a
Merge pull request #18049 from AspirinSJL/clean_subchannel_index
...
Remove subchannel_index.{h,cc}
2019-02-14 11:09:49 -08:00
prettyboy
48773405dd
Pass WSA_FLAG_NO_HANDLE_INHERIT flags to the WSASocketA() to avoid
...
handle leaking on the Windows in case of using CreateProcess() on the server
2019-02-14 20:57:35 +03:00
Juanli Shen
3a0f2cf2d7
Merge pull request #18043 from AspirinSJL/fix_subchannel
...
Fix subchannel ref_from_weak_ref
2019-02-14 09:15:06 -08:00
Juanli Shen
8f151edcd0
Remove subchannel_index.{h,cc}
2019-02-13 15:00:25 -08:00
Juanli Shen
62c8b447a8
Fix subchannel ref_from_weak_ref
2019-02-13 14:54:50 -08:00
Arjun Roy
48c44ef9e4
grpc: aligned creation of handshaker factory lists
2019-02-13 13:00:06 -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
yang-g
684643ff0a
Test fixing php
2019-02-13 11:02:48 -08:00
rmstar
52360b8fa7
Merge pull request #17872 from rmstar/cfstream_test
...
Add test for network transitions when CFStream is enabled
2019-02-13 10:49:35 -08:00
Keith Moyer
79285ccb23
Merge branch 'master' into master
2019-02-13 10:26:21 -08:00
Mark D. Roth
bab8123763
LB policy picker API
2019-02-13 08:30:04 -08:00
Srini Polavarapu
b0efc103e3
Regenerate projects
2019-02-12 21:07:42 -08:00
Soheil Hassas Yeganeh
2c93381e84
Merge pull request #18002 from soheilhy/pollset-review
...
Address guantaol@'s comments on Pull #17964
2019-02-12 22:23:15 -05:00
yang-g
63aa8e1d73
clang-format
2019-02-12 15:27:50 -08:00
yang-g
bc946d6c6d
merge with head and resolve conflicts
2019-02-12 15:00:32 -08:00
Arjun Roy
593852c2ba
grpc handshaker linkage fixup
2019-02-12 12:50:24 -08:00
Prashant Jaikumar
6d14987f09
Fixed cast in endpoint_cfstream.cc
2019-02-12 11:31:47 -08:00
Yash Tibrewal
5c4a4e8e76
Merge pull request #18010 from yashykt/cmsgspaceinc
...
Increase allocated space for cmsgs
2019-02-12 10:32:27 -08:00
Arjun Roy
406ac37fce
Merge pull request #17740 from arjunroy/handshaker_cpp
...
grpc_handshaker, grpc_handshaker_mgr C++ implementations
2019-02-12 10:25:28 -08:00
Mark D. Roth
68a661dfb5
Merge pull request #17947 from markdroth/grpclb_service_config_fix
...
Don't pass service config from parent channel to grpclb balancer channel.
2019-02-12 07:46:50 -08:00
Yash Tibrewal
5eeb651a5f
Add extra space for opt_stats as part of the formula as opposed to 1024
2019-02-11 17:20:23 -08:00
Yash Tibrewal
6a372ff442
Use constexpr
2019-02-11 16:58:24 -08:00
Vijay Pai
ac4c291773
Merge pull request #17957 from vjpai/callback_test_http_if_possible
...
Enable TCP callback tests if the event engine allows
2019-02-11 16:48:41 -08:00
Yash Tibrewal
5a44f700bb
Increase allocated space for cmsgs
2019-02-11 16:23:16 -08:00
apolcyn
349864c77b
Merge pull request #17998 from apolcyn/disable_txt_lookups_by_defaut
...
Disable service config resolution with c-ares by default, for now
2019-02-11 14:07:26 -08:00
Vijay Pai
a47c979ba0
Enable TCP callback tests if the event engine allows
2019-02-11 12:05:37 -08:00
Vijay Pai
ccdbb78452
Merge pull request #17984 from vjpai/app_exec_ctx_comment
...
Document ApplicationCallbackExecCtx
2019-02-11 12:04:27 -08:00
Vijay Pai
a632af0298
Merge pull request #17981 from vjpai/app_exec_ctx
...
Instantiate application callback exec ctx's in a few places where needed
2019-02-11 12:03:56 -08:00
Arjun Roy
195a30bb8b
Grpc: Change grpc_handshake and grpc_handshake_mgr to use CPP implementations.
...
grpc_handshake is renamed to GrpcHandshake, using C++ class definitions
instead of C-style vtable classes. Update callers to use new interfaces.
We use RefCountedPtr to simplify reference tracking.
2019-02-11 11:35:08 -08:00
Alexander Polcyn
93b7acd9bf
Disable service config resolution with c-ares by default
2019-02-11 10:30:08 -08:00
Eric Gribkoff
236d214574
Merge pull request #17996 from ericgribkoff/another_fork_fix
...
grpc_prefork(): check grpc_is_initialized before creating execctx
2019-02-11 10:18:58 -08:00
Vijay Pai
f96d630c33
Document ApplicationCallbackExecCtx, update ExecCtx comments
2019-02-11 10:14:52 -08:00
Eric Gribkoff
b90dd36270
add comment
2019-02-11 08:13:06 -08:00
Soheil Hassas Yeganeh
611857accb
Address guantaol@'s comments on Pull #17964
2019-02-11 09:56:39 -05:00
Yash Tibrewal
c7fa7a9188
Merge pull request #17989 from yashykt/fathomoops
...
Memset before setting length
2019-02-10 23:57:36 -08:00
Eric Gribkoff
34965961cf
check grpc is init before creating execctx
2019-02-09 13:00:37 -08:00
Eric Gribkoff
b3ed1f4548
Merge pull request #17973 from ericgribkoff/prefork_handler_bugfix
...
Don't count internal ApplicationCallbackExecCtx against ExcCtx count
2019-02-08 17:47:14 -08:00
Yash Tibrewal
30d8f7a626
Memset before setting length
2019-02-08 17:14:45 -08:00
Vijay Pai
85d76b2888
Add ApplicationCallbackExecCtx in other spots that may trigger application work
2019-02-08 16:56:42 -08:00
Vijay Pai
67c010b44f
Add default initialization value
2019-02-08 14:21:34 -08:00
Mark D. Roth
0794507043
Don't pass service config from parent channel to grpclb balancer channel.
2019-02-08 13:07:27 -08:00
Juanli Shen
0c39279b78
Merge pull request #17974 from AspirinSJL/subchannel_destruction
...
Fix subchannel call destruction
2019-02-08 10:38:09 -08:00
Vijay Pai
f815656256
Instantiate an application callback exec ctx in security filter
2019-02-08 00:12:29 -08:00
Yash Tibrewal
d98dbf5ee5
Merge branch 'master' into keepaliveopt
2019-02-07 17:21:48 -08:00
Soheil Hassas Yeganeh
47eb8dcf33
Merge pull request #17964 from soheilhy/worktree-fd-cache
...
Track the pollsets of an FD in PO_MULTI mode for pollex.
2019-02-07 18:42:34 -05:00
Juanli Shen
1bd32fb4d5
Merge pull request #17954 from AspirinSJL/null_json
...
Add null input handling in grpc_json_destroy()
2019-02-07 15:09:05 -08:00
Juanli Shen
db1c09ad49
Fix subchannel call destruction
2019-02-07 13:48:11 -08:00
Eric Gribkoff
a61785f184
Don't count internal ApplicationCallbackExcCtx against ExcCtx count
...
This was originally done for ExcCtx in
https://github.com/grpc/grpc/pull/15825 . This avoids a hang in our
pre-fork handler, where grpc_core::Executor::RunClosures attempts to
increment the thread count from an invocation of grpc_prefork():
2019-02-07 12:57:13 -08:00
Keith Moyer
619e6c8ef6
Compare mask with zero
...
Masking a value and comparing to one will only work if the mask itself
is equal to one (which is not the case here). Comparing to zero works
for any mask.
2019-02-07 11:25:50 -08:00
Yash Tibrewal
c79a632c6d
Merge pull request #17959 from yashykt/errortracing
...
Add error logging around GOAWAYs and chttp2 logging around keepalives
2019-02-07 11:22:45 -08:00
Juanli Shen
1fab48edfc
Add null input handling in grpc_json_destroy()
2019-02-07 11:08:20 -08:00
Soheil Hassas Yeganeh
75dec4d0f2
Track the pollsets of an FD in PO_MULTI mode for pollex.
...
Each pollset in pollex has a lock, grabbed upon adding an FD
to the pollset. Since this is called on a per-call basis,
there is a flat array caching the FDs of the pollset, to
avoid unnecessarily calling epoll_ctl multiple times for
the same FD.
This has two problems:
1) When multiple threads add FDs to the same pollset,
we will have contention on the pollset lock.
2) When we have many FDs we simply run out of cache storage,
and call epoll_ctl().
This commit changes the caching strategy by simply storing
the epfd of pollsets of an FD inside that FD, when we are in
PO_MULTI mode. This results in address in both (1) and (2).
Moreover, this commit fixes another performance bug.
When we have a release FD callback, we do not call close().
That FD will remain in our epollset, until the new owner of
the FD actually call close(). This results in a lot of spurious
wake ups when we simply hand off gRPC FDs to other FDs.
Note that this is a revision on the reverted commit
e83e463b5a (PR #17823 ).
The main change is to track the epfd of the pollset
instead of the pollset pointer, so that if the pollset
is deleted we can still access the FD. It also halves
the size of the cache vector for 64-bit machines.
2019-02-07 11:15:07 -05:00
Jan Tattermusch
89110b0352
Merge pull request #17950 from jtattermusch/bad_window_update
...
Ignore reserved bit in WINDOW_UPDATE frame
2019-02-07 12:43:00 +01:00
Nicolas Noble
9ff175961e
Merge pull request #17958 from grpc/revert-17823-fd-cache
...
Revert "Track the pollsets of an FD in PO_MULTI mode for pollex."
2019-02-06 23:42:27 -08:00
apolcyn
bc3abf3fcb
Merge pull request #17897 from apolcyn/enable_ares_take_3
...
Revert "Revert c-ares as the default resolver"
2019-02-06 19:43:39 -08:00
Yash Tibrewal
3af64e8495
Reduce logging level to info from error for goaway
2019-02-06 19:22:15 -08:00
Yash Tibrewal
25797cf806
Add logging around GOAWAYs and keepalives
2019-02-06 18:58:31 -08:00
Nicolas Noble
26605fa309
Revert "Track the pollsets of an FD in PO_MULTI mode for pollex."
2019-02-06 17:02:57 -08:00
Noah Eisen
84e6c851b4
Merge pull request #17949 from ncteisen/error-hotpath
...
Fix TSAN in no_error_on_hotpath Test
2019-02-06 15:18:29 -08:00
Jan Tattermusch
f83fbe95b4
Merge pull request #17888 from xichengliudui/updatefiles
...
Fix various typos in .cc and .md files
2019-02-06 23:33:43 +01:00