Commit Graph

42 Commits

Author SHA1 Message Date
ZHANG Dapeng 23bb2ebf31
all: publish grpc-rls
Making `io.grpc:grpc-rls` a maven artifact from next release.
2021-02-08 21:39:54 -08:00
ZHANG Dapeng cb3317b1fd
rls: fix wrong lookup request server field
The server filed in lookup request as specified in go/dynamic-request-routing/#heading=h.eqjtcpo6u8ep should be the original target, not the RLS server where the lookup request is sent to.
2021-02-08 15:53:36 -08:00
ZHANG Dapeng 2cd45e7a24
rls: forcefully close rls channel when lb is shutdown
RLS RPC deadline is configured by service config, and could be extremely long. When RLS lb is shutdown, any pending RLS PRC should be cancelled. Now using shutdownNow() to forcefully close the RLS channel.
2021-02-08 15:52:53 -08:00
ZHANG Dapeng 9bb9fef6b0
rls: use channel creds to create resolvingOobChannel 2021-01-29 09:29:39 -08:00
Chengyuan Zhang b66d182bb9
api: delete LoadBalancer.Helper APIs that had been deprecated for a long time (#7793) 2021-01-11 15:25:35 -08:00
ZHANG Dapeng 7d77f64773
compiler: remove some of the static imports in codegen (#7751)
Resolves #7741 
Some of the static methods in generated code have the same method name but different package name, such `ClientCalls.asyncClientStreamingCall` and `ServerCalls.asyncClientStreamingCall`. It's less readable using static import than using full-qualified method name in-place.
2020-12-23 11:28:03 -08:00
ZHANG Dapeng 821ec65f2e
rls: cleanup and minor enhancement for rls logging
Cleanup `toString()` for cache entries, and print more debug information about cache entry when `pickSubchannel()`. This will be more helpful to debug.
2020-12-11 11:45:33 -08:00
ZHANG Dapeng 5111eca71b
rls: remove redundant request field in CachedRouteLookupResponse 2020-10-28 17:24:23 -07:00
ZHANG Dapeng b8257d6f06
rls: fix RPC hanging if lookup request fails (#7511) 2020-10-13 22:42:34 -07:00
ZHANG Dapeng cc5403c4c9
rls: allow defaultTarget in RouteLookupConfig unset
The `default_target` field can be unset per the [spec](http://go/grpc-rls-lb-policy-design)

Also fixed a synchronization bug (related to #7460) that `createOrGet()` should be guarded by lock.
2020-10-07 15:36:57 -07:00
ZHANG Dapeng f59cd0a599
rls: add logging for rls lb 2020-10-07 15:36:14 -07:00
ZHANG Dapeng f6c2d221e2
rls: fix wrong synchronization for pickSubchannel()
`RlsPicker.pickSubchannel()` does not run in SynchronizationContext, but it calls `CachingRlsLbClient.get()` which assumed running in SynchronizationContext. Fixed by removing `synchronizationContext.throwIfNotInThisSynchronizationContext()`. `CachingRlsLbClient.get()` is actually thread-safe in the sense it's guarded by lock, and `DataCacheEntry`'s fields are final.

`ChildPolicyWrapper.picker` was not thread-safe. Fixed by making it volatile.

Changed the test a bit since the old test doesn't really test things well.
2020-09-30 15:31:09 -07:00
ZHANG Dapeng e4c3de6334
rls: fix RLS_DATA_KEY propagation in headers 2020-09-28 09:56:01 -07:00
Chengyuan Zhang eb6110cefc
rls, xds: fix parameter comments that do not match the formal parameter name (#7319) 2020-08-12 09:50:54 -07:00
Eric Anderson e92b2275f9 Update to Error Prone 2.4
Most of the changes should be semi-clear why they were made. However, BadImport
may not be as obvious: https://errorprone.info/bugpattern/BadImport . That
impacted classes named Type, Entry, and Factory. Also
PublicContructorForAbstractClass:
https://errorprone.info/bugpattern/PublicConstructorForAbstractClass

The JdkObsolete issue is already resolved but is not yet in a release.
2020-08-06 10:56:16 -05:00
Jihun Cho b8822e56af
rls: OobChannel doesn't use directpath by default (#7176) 2020-07-01 12:02:49 -07:00
Jihun Cho 0f1631c7a3
rls: use system property to use direct path for oob channel (#7142) 2020-06-19 09:44:57 -07:00
Jihun Cho 8ab01c1fe6
rls: request factory prepends leading '/' (#7141) 2020-06-18 17:12:19 -07:00
Jihun Cho 4a80b42118
rls: update proto (#7046) 2020-05-15 12:27:05 -07:00
Jihun Cho e7d6b5f808
rls: add bazel build (#7019) 2020-05-07 17:59:47 -07:00
Jihun Cho 6cde3b220b
all: fix lint warnings (#7016) 2020-05-07 15:43:53 -07:00
Jihun Cho 73d35e336e
rls: add internal api to provide default cachnig client builder for testing (#7014) 2020-05-06 14:11:22 -07:00
Jihun Cho e62148f85d
rls: remove internal package (#7013) 2020-05-06 11:21:21 -07:00
Jihun Cho 0057c4f29d
rls: temporarily disable lb test until fixed (#7011) 2020-05-05 18:05:23 -07:00
Jihun Cho 86fc047966
rls: add internal package description (#7009) 2020-05-05 17:06:12 -07:00
Jihun Cho 8b914ee114
rls: add guava dependency (#7008) 2020-05-05 13:53:08 -07:00
Jihun Cho 8e8477704a
rls: generate rls coverage (#7004) 2020-05-05 10:11:33 -07:00
Jihun Cho 0515b8bed3
rls: fix resize, add some tests (#7005) 2020-05-05 10:11:12 -07:00
Jihun Cho f40af886e9
rls: add rls-exprimnetal LoadBalancer (#6998) 2020-05-04 18:05:19 -07:00
ZHANG Dapeng 0044f8ce56
all: migrate gradle build to java-library plugin
- Use gradle configuration `api` for dependencies that are part of grpc public api signatures.
- Replace deprecated gradle configurations `compile`, `testCompile`, `runtime` and `testRuntime`.
- With minimal change in dependencies: If we need dep X and Y to compile our code, and if X transitively depends on Y, then our build would still pass even if we only include X as `compile`/`implementation` dependency for our project. Ideally we should include both X and Y explicitly as `implementation` dependency for our project, but in this PR we don't add the missing Y if it is previously missing.
2020-05-04 16:44:30 -07:00
Jihun Cho 50a829ad9d
rls: caching rls client (#6966) 2020-05-01 12:02:05 -07:00
Jihun Cho 4a644cb876
rls: fake direct scheduled executor supports schedule (#6957) 2020-04-22 12:04:26 -07:00
Jihun Cho 459cbc7b44
rls: add interface to ResolvedAddressFactory (#6958) 2020-04-21 19:12:32 -07:00
Jihun Cho 23bcdb1a09
rls: lb policy config object (#6883) 2020-04-20 23:04:17 -07:00
Jihun Cho 050679bdf3
rls: child lb resolved address factory (#6886) 2020-04-13 10:46:19 -07:00
Jihun Cho 1a1583de52
rls: delegating helper for rls child policies (#6904) 2020-04-11 00:20:18 -07:00
Jihun Cho 1686d703e6
rls: rls request factory (aka key builder map) (#6823) 2020-04-10 15:56:40 -07:00
Jihun Cho 4974b51c53
rls: LruCache interface and implementation (#6799) 2020-04-10 10:52:13 -07:00
Jihun Cho 58a92b7530
rls: subchannel state manager (#6882) 2020-04-06 17:33:39 -07:00
Jihun Cho b72477e282
rls: fix RlcProto parsing issues (#6822) 2020-03-12 18:46:05 -07:00
Jihun Cho a680c982f5
rls: adaptive throttler (#6749) 2020-03-12 18:45:36 -07:00
Jihun Cho 0fd4975d4c
rls: add proto and converter (#6743) 2020-02-28 21:41:19 -08:00