Commit Graph

4144 Commits

Author SHA1 Message Date
Eric Anderson 9ead606b84
netty: Reduce race window size between GOAWAY and new streams
The race between new streams and transport shutdown is #2562, but it is still
far from being generally solved. This reduces the race window of new streams
from (transport selection → stream created on network thread) to (transport
selection → stream enqueued on network thread). Since only a single thread now
needs to do work in the stream creation race window, the window should be
dramatically smaller.

This only reduces GOAWAY races when the server performs a graceful shutdown
(using two GOAWAYs), as that is the only non-racy way on-the-wire to shutdown a
connection in HTTP/2.
2020-04-10 12:03:23 -07:00
Jihun Cho 4974b51c53
rls: LruCache interface and implementation (#6799) 2020-04-10 10:52:13 -07:00
Chengyuan Zhang 833a3ff293
xds: handle EDS update with no localities (#6915)
Allow receiving empty LocalityLbEnpoints in EDS responses, it is LB policies' responsibility to go to TRANSIENT_FAILURE immediately when receiving an update with no locality.
2020-04-09 18:42:58 -07:00
Eric Anderson ec010c1a62 core: Delay transport shutdown during updateAddresses()
A user has been seeing "InternalSubchannel closed transport due to address
change" errors (b/153064566). It is unclear if they are predomenent, but they
are at least adding noise. Since #2562 is still far from being generally
solved, we delay the shutdown a while to side-step the race.
2020-04-09 14:59:48 -07:00
Andrew Gasparovic 2119fac35b
compiler: Remove unused function (#6911) 2020-04-08 14:12:00 -07:00
Chengyuan Zhang 54f9e29cdb
xds: fix lint warnings (#6907) 2020-04-07 15:31:36 -07:00
sanjaypujare 829a7c5a29
xds: remove hardcoded port and unneeded test (#6908) 2020-04-07 15:00:35 -07:00
ZHANG Dapeng c91e127f93
Start 1.30.0 development cycle 2020-04-07 14:12:53 -07:00
ZHANG Dapeng 5c31dc6d71
xds: migrating XdsNameResolver to "xds" scheme
Change "xds-experimenal" scheme to "xds" and add a deprecated provider with "xds-experimenal" scheme for keeping current users' tests working.
2020-04-07 11:52:41 -07:00
Chengyuan Zhang d88f0f19ec
xds: implement LRS LB policy (#6858)
Part of xDS LB policy refactoring work. Implement the LRS LB policy for "balancing" endpoints within a certain locality.
2020-04-07 11:44:36 -07:00
Jihun Cho 58a92b7530
rls: subchannel state manager (#6882) 2020-04-06 17:33:39 -07:00
Chengyuan Zhang ae4510a219
interop-testing: delete deprecated environment variable for enabling grpclb (#6903) 2020-04-06 13:42:01 -07:00
Chengyuan Zhang 8e9ceb5c3f
core: keep round_robin lb subchannel in TRANSIENT_FAILURE until becoming READY (#6657)
Make each subchannel created by RR stay in TRANSIENT_FAILURE state until READY. That is, each subchannel ignores consequent non-READY states after TRANSIENT_FAILURE.
2020-04-06 12:08:04 -07:00
Ran 37913fd3b1
stub: add Blocking StubType to blocking ClientCalls methods. (#6900) 2020-04-06 10:55:24 -07:00
ZHANG Dapeng 24e3d9587e
xds: generate xds-routing config from XdsNameResolver 2020-04-04 10:48:43 -07:00
Chengyuan Zhang a1815417de Update README etc to reference 1.28.1 2020-04-03 16:11:41 -07:00
sanjaypujare e68b1d2ed6
xds: ensure we shutdown XdsClientImpl when XDS Server is shut down (#6890) 2020-04-03 10:08:00 -07:00
ZHANG Dapeng 1086ee89c1
grpclb,xds: fix code lint 2020-04-02 18:18:32 -07:00
ST-DDT c89bf49b6a
api: Fix javadoc reference to deprecated method (#6894) 2020-04-02 16:43:28 -07:00
Eric Gribkoff 4ae7a37d7c
interop-testing: add health service to XdsTestServer (#6891) 2020-04-02 15:39:25 -07:00
sanjaypujare 7555a400db
xds: set listeningAddresses in Node and metadata as per the new interface (#6880) 2020-04-02 14:29:36 -07:00
Eric Anderson 84dd812db8 all: Add more projects to the all super-project
This adds to the published JavaDoc and reported code coverage.
2020-04-02 08:57:31 -07:00
Eric Anderson 103c33e821 services,grpclb: Filter internal files from javadoc/jacoco 2020-04-02 08:57:31 -07:00
Eric Anderson fb8833c57b all: Add grpc-xds
This will fix reporting of xDS code coverage.
2020-04-01 12:39:11 -07:00
Eric Anderson 186cfebcba all: Move jacocoTestReport exclusions to individual projects
The sourceSets.main.output.collect should probably be improved at some point to
improve loading performance, but this is technically better than what we had
before so let's call it a win and move on.
2020-04-01 10:33:32 -07:00
Chengyuan Zhang ffb70cd433
xds: patch unit tests for changes in locality filtering (#6881)
Add unit test that covers handling EDS responses containing: locality with 0 endpoint, locality with 0 weight.
2020-03-31 18:06:13 -07:00
sanjaypujare 5bb5e25583
xds: exclude 3 transitive deps from opencensus_proto to use our own (#6878) 2020-03-31 15:10:09 -07:00
Jihun Cho 6dbdfcdbbc
grpclb: CachedSubchannelPool use new create subchannel (#6831) 2020-03-31 13:31:04 -07:00
Jihun Cho ae211a1ba8
benchmarks: fix missing configuration for netty server (#6877) 2020-03-31 13:00:10 -07:00
Chengyuan Zhang 68391e4d1b
xds: filter EDS localities with clarified specifications (#6874)
Fix logic of filtering localites in EDS responses:
   - Each LocalityLbEndpoints message is allowed to contain 0 LbEndpoints. 
   - LocalityLbEndpoints without or with 0 weight are ignored. 
   - NACK responses with sparse locality priorities.
2020-03-30 14:24:48 -07:00
Chris Nokleberg e081f414a7
core: copy the SchemaDescriptor when rebuilding descriptor (#6851)
useMarshalledMessages works by duplicating a ServerServiceDefinition while replacing just the marshallers. It currently does not copy over the SchemaDescriptors, which breaks at least the ProtoReflectionService.
2020-03-30 14:07:24 -07:00
sanjaypujare 1bf5ad1527
xds: update to envoy commit id b16ce6d5ea0d2da73e764d145623e7367dc59ed3 (#6871) 2020-03-30 12:16:29 -07:00
Chris Nokleberg a4275b63f4
core: preserve KnownLength when wrapping InputStream (#6852)
useInputStreamMessages ensures that the InputStream supports marking by wrapping the stream in a BufferedInputStream if markSupported() returns false. This change uses a new subclass of BufferedInputStream that also implements KnownLength, when the original stream also implements KnownLength.
2020-03-30 10:09:15 -07:00
Chengyuan Zhang 6c5a7df1d4
android-interop-testing: resolve build warnings (#6870)
Suppressed compiler warnings caused by protobug-javalite and errorrprone warnings from grpc-interop-testing + "throw-in-finally".
2020-03-27 17:22:58 -07:00
Eric Anderson 2c250ace52 netty: prevent interruption during bind from leaking channel
Fixes #6850
2020-03-27 17:21:22 -07:00
ZHANG Dapeng 0b4503e4b2
xds: rollback PGV dependency from using maven artifact to importing proto source
PGV is adding new fields (`well_known_regex` and `strict`) to proto and some of our new features require the most current envoy API which in turn requires the new fields in latest PGV proto (https://github.com/envoyproxy/envoy/blob/master/api/envoy/api/v2/core/base.proto#L251), but they are not available in the latest PGV maven release.
2020-03-27 17:09:27 -07:00
Kun Zhang e28bb1975f
xds: fix lint warnings (#6869) 2020-03-27 16:04:11 -07:00
Eric Anderson c7f69c851b core: Add missing setListener if decompressor is unknown
Previously AbstractServerStream would throw an exception which would kill the
RPC with a RST_STREAM. Now the server actually responds with a clean error
message and avoids spamming the logs.

WARNING: Exception in onHeadersRead()
java.lang.IllegalStateException
	at com.google.common.base.Preconditions.checkState(Preconditions.java:495)
	at io.grpc.internal.AbstractStream$TransportState.onStreamAllocated(AbstractStream.java:232)
	at io.grpc.internal.AbstractServerStream$TransportState.onStreamAllocated(AbstractServerStream.java:224)
	at io.grpc.netty.NettyServerHandler.onHeadersRead(NettyServerHandler.java:451)
	at io.grpc.netty.NettyServerHandler.access$900(NettyServerHandler.java:101)
	at io.grpc.netty.NettyServerHandler$FrameListener.onHeadersRead(NettyServerHandler.java:807)
	at io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.onHeadersRead(DefaultHttp2ConnectionDecoder.java:373)
2020-03-27 12:52:13 -07:00
Chengyuan Zhang 9dec06cc91
Upgrade protobuf plugin version to 0.8.12, android plugin version to 3.5.0 (#6859) 2020-03-27 12:10:56 -07:00
Eric Gribkoff e2bb44106a
buildscripts: allow per-xds test case artifacts (#6857) 2020-03-26 10:13:05 -07:00
sanjaypujare a2896051b8
xds: integration of XdsClientImpl with XdsServerBuilder to deliver Listener updates (#6838) 2020-03-25 10:14:29 -07:00
jiangtaoli2016 47b6b390bb update android-interop-testing ca.pem 2020-03-24 09:06:05 -10:00
Jihun Cho bf12157fc4
build: bump netty to 4.1.48.Final, bump tcnative to 2.0.30.Final (#6845) 2020-03-24 11:54:59 -07:00
Kun Zhang fc53747f1f
xds: annotate XdsRoutingLoadBalancerTest with RunWith (#6855)
This is required inside google for all tests.
2020-03-24 11:48:28 -07:00
Kun Zhang 2e3ad1de25
core: prevent data race in ManagedChannelOrphanWrapper (#6854)
Data race was detected internally when
ManagedChannelOrphanWrapper.shutdown() was called concurrently:

WARNING: ThreadSanitizer: data race (pid=5009)
  Write of size 8 at 0x7fd2f7f37530 by thread T49:
    #0 java.lang.ref.Reference.clear()V Reference.java:265
    #1 io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.clearInternal()V ManagedChannelOrphanWrapper.java:118
    #2 io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.clear()V ManagedChannelOrphanWrapper.java:110
    #3 io.grpc.internal.ManagedChannelOrphanWrapper.shutdown()Lio/grpc/ManagedChannel; ManagedChannelOrphanWrapper.java:58
    (stacktrace redacted)

  Previous write of size 8 at 0x7fd2f7f37530 by thread T45 (mutexes: write M267260296638793720, write M267541771615505864, write M267823246592216728, write M267260296898451984, write M267541771875162784, write M267823246851873416):
    #0 java.lang.ref.Reference.clear()V Reference.java:265
    #1 io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.clearInternal()V ManagedChannelOrphanWrapper.java:118
    #2 io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.clear()V ManagedChannelOrphanWrapper.java:110
    #3 io.grpc.internal.ManagedChannelOrphanWrapper.shutdown()Lio/grpc/ManagedChannel; ManagedChannelOrphanWrapper.java:58
    (stacktrace redacted)
2020-03-23 18:02:00 -07:00
Jiangtao Li 0ba9d3e2d1
Update to test credentials to use 2048-bit RSA key (#6841)
Update to test credentials to use 2048-bit RSA key
2020-03-23 14:43:04 -07:00
ZHANG Dapeng 6a64951005
xds: implement XdsRoutingLoadBalancer 2020-03-23 14:42:44 -07:00
Chengyuan Zhang 8d4240f480
android-interop-testing: set minSdkVersion to 14 in manifest (#6846) 2020-03-20 15:53:45 -07:00
Chengyuan Zhang 95e331a69b
buildscripts: clean up android related scripts (#6843)
Fix incorrect android-interop-testing apk path after flatten the project structure.
2020-03-19 19:09:54 -07:00
Chengyuan Zhang d537adedb3
android-interop-testing: include android interop testing in main build (#6829)
Proto generated code for android-interop-testing is checked in.
2020-03-19 12:37:48 -07:00