Commit Graph

11847 Commits

Author SHA1 Message Date
Yang Gao d371dae02a
Merge pull request #19216 from yang-g/acceptor
Add listner fd as part of the external connection parameters
2019-06-04 12:13:58 -07:00
Moiz Haidry 044a8e29df
Merge pull request #19214 from mhaidrygoog/fix_map_erase
Fixed erase() method by changing RemoveRecursive()
2019-06-03 15:36:28 -07:00
Esun Kim bac7da1dae
Merge pull request #19136 from veblush/global-config-best
Applied the best practice using global configuration
2019-06-03 15:29:06 -07:00
Moiz Haidry b0ef377ebd Fixed erase() method by changing RemoveRecursive() to return a new iterator to the successor in addition to the new root. Both are returned as a single pair 2019-06-03 13:37:28 -07:00
yang-g c156653997 Add listner fd as part of the external connection parameters 2019-06-03 10:38:37 -07:00
weiyongji 6040249a61 fix a windows compile warning 2019-06-01 11:31:23 +08:00
Juanli Shen 7fce9da88f
Merge pull request #19198 from mehrdada/strncpy-gcc-warning
Put strncpy in parens to silence GCC warning
2019-05-31 16:46:41 -07:00
Mehrdad Afshari 8fa95462a1 Put strncpy in parens to silence GCC warning
GCC warns (-Wstringop-truncation) because the destination
buffer size is identical to max-size, leading to a potential
char[] with no null terminator.  nanopb can handle it fine,
and parantheses around strncpy silence that compiler warning.

nanopb treatment of string buffers with specific max length
seems dangerous in general, specifically when read from,
but this particular case should be correct, as the buffer
is only ever read by nanopb itself, which takes the max
size into consideration, in addition to the null terminator.
2019-05-31 15:03:54 -07:00
Esun Kim 434b3b62e5 Applied the best practice using global configuration 2019-05-31 14:46:58 -07:00
Yang Gao 07c9f7a36b
Merge pull request #19139 from yang-g/plugin_creds
Avoid accessing freed auth_metadata_context in C++ plugin.
2019-05-31 14:35:52 -07:00
Yihua Zhang a887f35a9b add a new struct - grpc_ssl_verify_peer_options and an API - grpc_ssl_credentials_create_ex. 2019-05-30 16:00:50 -07:00
yang-g a874fd8bbb Resolve review comments 2019-05-30 15:20:10 -07:00
Karthik Ravi Shankar 79a8b5289e
Merge pull request #19178 from grpc/revert-19175-revert-18813-callback-rpc-lock
Revert "Revert "Start supporting a callback-based RPC under lock""
2019-05-30 11:56:16 -07:00
Karthik Ravi Shankar fc002a4d02 Remove ref for GRPC_ERROR_NONE 2019-05-29 16:59:10 -07:00
Karthik Ravi Shankar 724565372f Fix the ref count issue 2019-05-29 16:42:06 -07:00
Mark D. Roth d26201494b
Merge pull request #18917 from markdroth/subchannel_interface
Use SubchannelInterface to hide implementation from LB policy API
2019-05-29 15:20:40 -07:00
Karthik Ravi Shankar 8ef2152c80 Fix the memory leak. 2019-05-29 14:28:56 -07:00
Arjun Roy 0dc4c8ab1d
Merge pull request #19129 from arjunroy/call_atomic_batchref
Replaced gpr_ref with grpc_core::Atomic in call batch struct
2019-05-29 14:24:30 -07:00
Karthik Ravi Shankar 196b0aa3a3
Revert "Revert "Start supporting a callback-based RPC under lock"" 2019-05-29 13:15:47 -07:00
Mark D. Roth 28ccd61cf5 Use SubchannelInterface to hide implementation from LB policy API. 2019-05-29 12:21:15 -07:00
Karthik Ravi Shankar b790c24e5c
Revert "Start supporting a callback-based RPC under lock" 2019-05-29 11:20:36 -07:00
Mark D. Roth 9ecce9fd22
Merge pull request #19049 from markdroth/lb_policy_api_cleanups
More LB policy API improvements.
2019-05-29 07:12:41 -07:00
yang-g 47dbf1dd26 Second approach 2019-05-28 23:47:29 -07:00
Arjun Roy 7f852c553b
Merge pull request #19031 from arjunroy/md_intern_unref_v2
Inline more of md_unref for interned metadata.
2019-05-28 20:51:42 -07:00
Guantao Liu ae0f989828
Merge pull request #19163 from guantaol/iomgr_timer
Adjust the order of IOMgr timer initialization and comment of grpc_timer::heap_index
2019-05-28 18:32:57 -07:00
Arjun Roy 14c55dea4a Inline more of md_unref for interned metadata.
In the common case, unref() for interned metadata was performing some
unnecessary branches. This patch reduces the instruction count from about 19 to
12 in the case where an unref() occured but it wasn't the last reference.

This has various speedups for chttp2_hpack, metadata and fullstack pingpong
benchmarks.

As a tradeoff, static/external metadata unref regresses slightly (fraction of a
nanosecond increase in CPU time) while interned improves (roughly 5 nanoseconds
reduction in CPU time).

Examples:

Fullstack:

BM_UnaryPingPong<InProcess, NoOpMutator,  NoOpMutator>/8/8  [polls/iter:0 ]
7.12µs  ± 4%  6.91µs  ± 3%  -3.00%  (p=0.000  n=20+19)
BM_UnaryPingPong<TCP, NoOpMutator,  NoOpMutator>/0/32768
[polls/iter:3.0001  ] 35.3µs  ± 2%  34.9µs  ± 0%  -1.15%  (p=0.048  n=8+4)
BM_UnaryPingPong<TCP, NoOpMutator,  NoOpMutator>/32768/32768
[polls/iter:3.00014 ] 49.6µs  ± 1%  49.0µs  ± 1%  -1.15%  (p=0.017  n=7+3)

HpackParser:

BM_HpackEncoderInitDestroy
274ns ± 0%              254ns ± 0%   -7.12%        (p=0.000 n=19+19)
BM_HpackParserParseHeader<RepresentativeClientInitialMetadata, UnrefHeader>
173ns ± 0%              140ns ± 0%  -19.04%        (p=0.000 n=18+16)
BM_HpackParserParseHeader<MoreRepresentativeClientInitialMetadata, UnrefHeader>
751ns ± 1%              702ns ± 2%   -6.50%        (p=0.000 n=20+20)
BM_HpackParserParseHeader<RepresentativeServerTrailingMetadata, UnrefHeader>
50.6ns ± 0%             46.9ns ± 0%   -7.29%        (p=0.000 n=14+19)
BM_HpackParserParseHeader<RepresentativeClientInitialMetadata, OnInitialHeader>
486ns ± 1%              455ns ± 0%   -6.42%        (p=0.000 n=20+19)
BM_HpackParserParseHeader<MoreRepresentativeClientInitialMetadata,
OnInitialHeader>
1.17µs ± 1%             1.12µs ± 1%   -4.18%        (p=0.000 n=18+20)
BM_HpackParserParseHeader<RepresentativeServerInitialMetadata, OnInitialHeader>
163ns ± 1%              155ns ± 0%   -4.52%        (p=0.000 n=18+17)

Metadata:

BM_MetadataFromInternedKeyWithBackingStore                   7.32ns ± 1%
6.67ns ± 0%   -8.89%        (p=0.000 n=20+17)
BM_MetadataFromStaticMetadataStringsNotIndexed               77.4ns ± 2%
79.6ns ± 0%   +2.86%        (p=0.000 n=18+19)
BM_MetadataRefUnrefExternal                                  1.74ns ± 0%
1.79ns ± 0%   +2.65%        (p=0.000 n=20+19)
BM_MetadataRefUnrefInterned                                  18.5ns ± 0%
13.3ns ± 0%  -28.00%        (p=0.000 n=17+17)
BM_MetadataRefUnrefAllocated                                 18.5ns ± 0%
13.3ns ± 0%  -28.00%        (p=0.000 n=17+18)
2019-05-28 17:28:15 -07:00
Arjun Roy 42c93b5f45
Merge pull request #19101 from arjunroy/grpc_is_bin_hdr_v2
Inlined and saved some ops for grpc_is_binary_header.
2019-05-28 17:15:54 -07:00
Arjun Roy 7c8d6f6375 s/uintptr_t/intptr_t as requested 2019-05-28 17:13:41 -07:00
Guantao Liu 740c931e23 Adjust the order of IOMgr initialization, so as to set up a customized
timer correctly.

Also, change the comment of grpc_timer::heap_index.
2019-05-28 16:25:01 -07:00
Arjun Roy f13abc071c Inlined and saved some ops for grpc_is_binary_header.
Various improvements for parsing/encoding:

BM_HpackEncoderEncodeDeadline 171ns ± 0% 164ns ± 0% -3.74% (p=0.000 n=20+17)
BM_HpackEncoderEncodeHeader<SingleInternedKeyElem>/0/16384 102ns ± 1% 98ns ± 0% -3.28% (p=0.000 n=20+19)
BM_HpackParserParseHeader<AddIndexedSingleStaticElem, UnrefHeader> 177ns ± 1% 165ns ± 1% -6.41% (p=0.000 n=19+18)
BM_HpackParserParseHeader<NonIndexedBinaryElem<1, true>, UnrefHeader> 212ns ± 2% 199ns ± 1% -6.28% (p=0.000 n=20+18)
2019-05-28 15:31:52 -07:00
Arjun Roy 0f83755c6e chttp2 hpack encoder: fast-pathed static md/slice ops 2019-05-28 14:40:50 -07:00
Mark D. Roth 31ec9a74ae More LB policy API improvements. 2019-05-28 14:23:01 -07:00
yang-g 384f15ab6e Delay calling plugin_creds callback 2019-05-24 14:46:12 -07:00
Karthik Ravi Shankar 072fdf54ed
Merge pull request #18813 from karthikravis/callback-rpc-lock
Start supporting a callback-based RPC under lock
2019-05-23 21:51:31 -07:00
Arjun Roy 0a57193dec Replaced gpr_ref with grpc_core::Atomic in call batch struct 2019-05-23 16:11:23 -07:00
Karthik Ravi Shankar 3f05ac9584 Merge branch 'master' into callback-rpc-lock 2019-05-22 17:39:08 -07:00
Muxi Yan 8d058dc020
Correct include style 2019-05-22 16:15:47 -07:00
Juanli Shen a30c1d0971
Merge pull request #19018 from AspirinSJL/fix_fallback
xds enter fallback mode as long as no child policy is ready
2019-05-21 14:09:08 -07:00
Karthik Ravi Shankar ccc105f3fd Move GRPC_CLOSURE_RUN to GRPC_CLOSURE_SCHED
- As here we want it to be scheduled for execution later.
2019-05-21 11:07:43 -07:00
Karthik Ravi Shankar 035bf8eb14 Fix clang errors 2019-05-21 10:50:18 -07:00
Esun Kim ec46079358
Merge pull request #19078 from veblush/global-config-redo
This is a roll-forward of "Config migration" which was recently rolled back.
 - Original PR (#18931)
 - Rollback PR (#19027)
2019-05-21 08:37:26 -07:00
ncteisen 0f21350b85 Gallantly fix typo 2019-05-20 16:34:42 -07:00
Esun Kim 90fbdc92f5 Roll-forward "Config migration"
This reverts commit 236ae12bb1.
2019-05-20 15:47:24 -07:00
Karthik Ravi Shankar 061dfc911f Bring back the internalization 2019-05-20 13:51:27 -07:00
Juanli Shen 98461b0fa8 xds enter fallback mode as long as no child policy is ready 2019-05-18 19:50:31 -07:00
Karthik Ravi Shankar a89b1763af changes 2019-05-17 15:35:12 -07:00
Karthik Ravi Shankar 90fee3e586 Merge branch 'master' into callback-rpc-lock 2019-05-17 09:27:16 -07:00
Vijay Pai 62b422c4ee Grab a ref on fake resolver generator before scheduling a closure 2019-05-16 17:00:18 -07:00
Karthik Ravi Shankar 26ba981dee Fix clang errors 2019-05-16 09:34:20 -07:00
Karthik Ravi Shankar 4b89514919 Fix default value compile issues 2019-05-16 09:11:57 -07:00
yang-g c639da7a1d Merge branch 'master' of https://github.com/grpc/grpc into port_sharing 2019-05-16 09:07:55 -07:00
Mark D. Roth 34b00a243c
Merge pull request #19028 from markdroth/service_config_cleanup
Clean up some names in the service config code.
2019-05-15 14:31:39 -07:00
Mark D. Roth 356e7c2107 Clean up some names in the service config code. 2019-05-15 07:57:03 -07:00
murgatroid99 70e850a023 Merge branch 'master' into cares_windows_platform_detection 2019-05-14 17:41:25 -07:00
murgatroid99 5f0e68636e Move ifdefs around 2019-05-14 15:45:02 -07:00
Karthik Ravi Shankar 172bb1b30f Whitelist internal code path to use ApplicationExecCtx 2019-05-14 15:29:46 -07:00
murgatroid99 7743130f64 Consolidate conditional localhost resolution into existing file 2019-05-14 15:26:56 -07:00
Alexander Polcyn 236ae12bb1 Revert "Config migration"
This reverts commit 87905ae5ea.
2019-05-14 14:36:33 -07:00
Vijay Pai 0df4cb1bdc
Merge pull request #18959 from SataQiu/fix-20190506
Fix some spelling mistakes
2019-05-14 13:51:51 -07:00
Mark D. Roth f9a5243fef
Merge pull request #19025 from markdroth/health_check_client_refcount_fix
Fix bug from #19002.
2019-05-14 13:49:57 -07:00
Karthik Ravi Shankar 091c12ad79 Fix clang errors 2019-05-14 12:55:20 -07:00
Karthik Ravi Shankar a73f22bd73 Make the executor SHORT instead of LONG. 2019-05-14 12:10:17 -07:00
Karthik Ravi Shankar e68316dda5 Fix errors from clang format script 2019-05-14 12:07:05 -07:00
Karthik Ravi Shankar e3028a2836 Merge branch 'master' into callback-rpc-lock 2019-05-14 12:05:38 -07:00
Mark D. Roth 2ba3209b33 Fix bug from #19002. 2019-05-14 11:57:08 -07:00
Soheil Hassas Yeganeh 801eed8387
Merge pull request #18926 from soheilhy/slicebuffer-first
Introduce slice_buffer helper methods to avoid copies.
2019-05-14 13:39:17 -04:00
Esun Kim 987cd3d5ce
Merge pull request #19017 from veblush/fork-tsan
Made Fork.support_enabled_ atomic
2019-05-13 13:24:23 -07:00
Esun Kim 86febe4121 Made Fork.support_enabled_ atomic 2019-05-13 11:34:34 -07:00
yang-g de57783beb Merge with head and resolve conflict 2019-05-13 08:56:02 -07:00
murgatroid99 85b9520a90 Fix sanity 2019-05-10 15:43:04 -07:00
murgatroid99 90e52f00a1 Moved code back into one file with a #ifdef 2019-05-10 14:47:26 -07:00
Yash Tibrewal 1ff5791e47 Add tests for setting a channel to lame on an invalid default service config 2019-05-10 14:33:22 -07:00
Arjun Roy 50e16f6d3a
Merge pull request #18910 from arjunroy/slice_eq_static
Added slice equality when static fastpath.
2019-05-10 13:45:57 -07:00
Srini Polavarapu d961a54661
Merge pull request #19008 from srini100/master
Bump master version to 1.22.0-dev
2019-05-10 12:23:51 -07:00
Arjun Roy f65208af02 Added slice equality when static fastpath. 2019-05-10 11:35:27 -07:00
Mark D. Roth e802932a5b
Merge pull request #18839 from markdroth/subchannel_watcher
Revamp subchannel connectivity state monitoring APIs.
2019-05-10 11:21:56 -07:00
murgatroid99 4b4006f833 libuv cares: scope manual localhost resolution to only Windows 2019-05-10 11:15:12 -07:00
murgatroid99 d29804f611 Fix Windows vs libuv platform detection in cares code 2019-05-10 10:40:01 -07:00
Srini Polavarapu 6bc2ff1b5f Regenerate projects 2019-05-10 10:38:59 -07:00
Mark D. Roth 9f57c32b1b
Merge pull request #19002 from markdroth/health_check_client_refcount_fix
Fix ref-counting bug in health check client.
2019-05-10 08:29:56 -07:00
Mark D. Roth a4d4bb82c9 Revamp subchannel connectivity state monitoring APIs. 2019-05-10 07:57:11 -07:00
Soheil Hassas Yeganeh 04da62cc52
Merge pull request #18981 from soheilhy/call-unref
Use grpc_core::RefCount for grpc_call and mark Unref path unlikely.
2019-05-10 09:50:09 -04:00
Yash Tibrewal aa89a97531
Merge pull request #18946 from yashykt/svccfgerrortransient
Service Config Changes to set channel in transient failure on invalid service config
2019-05-10 06:14:44 -07:00
apolcyn d84b76c2c0
Merge pull request #18999 from apolcyn/more_logs
Add two more trace logs to the c-ares resolver
2019-05-09 20:55:13 -07:00
Yash Tibrewal d56bbf19d2 Reviewer comments 2019-05-09 15:50:52 -07:00
Mark D. Roth 12fbdaa6a8 Fix ref-counting bug in health check client. 2019-05-09 14:17:30 -07:00
Esun Kim 87905ae5ea Config migration 2019-05-09 12:29:38 -07:00
Yash Tibrewal 611bcbb988 Merge branch 'master' into svccfgerrortransient 2019-05-09 11:03:03 -07:00
Yash Tibrewal 98d8f85d4e Reviewer comments 2019-05-09 10:58:00 -07:00
Soheil Hassas Yeganeh cb9b43b9f7
Merge pull request #18986 from soheilhy/trace-macro
Introduce GRPC_TRACE_FLAG_ENABLED macro to mark trace branches unlikely.
2019-05-08 23:18:12 -04:00
Alexander Polcyn 569d33f49b Add two more trace logs to the c-ares resolver 2019-05-08 17:49:52 -07:00
Yash Tibrewal dfa45cb7ac Merge branch 'master' into svccfgerrortransient 2019-05-08 16:44:33 -07:00
apolcyn 9278411207
Merge pull request #17688 from apolcyn/ares_timeouts
Add a backup poller to c-ares resolver to take better advantage of c-ares query timeout/retry logic
2019-05-08 16:16:12 -07:00
Yash Tibrewal 3c4e8a9be2 Fix test failure 2019-05-08 15:46:32 -07:00
Yash Tibrewal b53465c106 Add test for not special casing grpclb if loadbalancingconfig is used 2019-05-08 14:27:58 -07:00
Soheil Hassas Yeganeh cc75d93818
Merge pull request #18963 from soheilhy/sb-len
Check count instead of length in maybe_embiggen() to reset the slice pointer.
2019-05-08 17:27:50 -04:00
Yash Tibrewal 40b6123d14 Fix TODOs 2019-05-08 10:53:26 -07:00
Yash Tibrewal abfe14e3ed Reviewer comments 2019-05-08 10:44:56 -07:00
Alexander Polcyn 2a4d62819b Revise c-ares timeouts to use c-ares's internal timeout/retry logic 2019-05-08 09:57:39 -07:00
Soheil Hassas Yeganeh 983f678cb8 Mark it unlikely for Unref() to return true.
In the hot path, specially when the dtor of a class is inlined,
we will have to skip quite a few instructions (for Delete and dtor)
before returning.

Mark Unref() as unlikely so that compiler moves the
decrement-refcnt-and-return code instructions to the front.
2019-05-08 12:49:38 -04:00