Skip to content

Commit 6c7abfe

Browse files
authored
Merge pull request #2917 from grpc/@grpc/grpc-js@1.13.x
Merge 1.13.x into master
2 parents daa5127 + a8142c2 commit 6c7abfe

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

packages/grpc-js-xds/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @grpc/grpc-js xDS plugin
22

3-
This package provides support for the `xds://` URL scheme to the `@grpc/grpc-js` library. The latest version of this package is compatible with `@grpc/grpc-js` version 1.10.x.
3+
This package provides support for the `xds://` URL scheme to the `@grpc/grpc-js` library. The latest version of this package is compatible with `@grpc/grpc-js` version 1.13.x.
44

55
## Installation
66

@@ -36,3 +36,4 @@ const client = new MyServiceClient('xds:///example.com:123');
3636
- [xDS Ring Hash LB Policy](https://github.com/grpc/proposal/blob/master/A42-xds-ring-hash-lb-policy.md)
3737
- [`pick_first` via xDS](https://github.com/grpc/proposal/blob/master/A62-pick-first.md#pick_first-via-xds-1) (Currently experimental, enabled by environment variable `GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG`)
3838
- [xDS-Enabled Servers](https://github.com/grpc/proposal/blob/master/A36-xds-for-servers.md)
39+
- [xDS-Based Security for gRPC Clients and Servers](https://github.com/grpc/proposal/blob/master/A29-xds-tls-security.md)

packages/grpc-js-xds/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@grpc/grpc-js-xds",
3-
"version": "1.12.2",
3+
"version": "1.13.0",
44
"description": "Plugin for @grpc/grpc-js. Adds the xds:// URL scheme and associated features.",
55
"main": "build/src/index.js",
66
"scripts": {
@@ -55,7 +55,7 @@
5555
"xxhash-wasm": "^1.0.2"
5656
},
5757
"peerDependencies": {
58-
"@grpc/grpc-js": "~1.12.0"
58+
"@grpc/grpc-js": "~1.13.0"
5959
},
6060
"engines": {
6161
"node": ">=10.10.0"

packages/grpc-js-xds/src/load-balancer-ring-hash.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -249,16 +249,20 @@ class RingHashLoadBalancer implements LoadBalancer {
249249
if (!(this.currentState === connectivityState.TRANSIENT_FAILURE || this.currentState === connectivityState.CONNECTING)) {
250250
return;
251251
}
252+
let firstIdleChild: LeafLoadBalancer | null = null;
252253
for (const leaf of this.leafMap.values()) {
253254
const leafState = leaf.getConnectivityState();
254255
if (leafState === connectivityState.CONNECTING) {
256+
firstIdleChild = null;
255257
break;
256258
}
257-
if (leafState === connectivityState.IDLE) {
258-
leaf.startConnecting();
259-
break;
259+
if (leafState === connectivityState.IDLE && !firstIdleChild) {
260+
firstIdleChild = leaf;
260261
}
261262
}
263+
if (firstIdleChild) {
264+
firstIdleChild.startConnecting();
265+
}
262266
}
263267

264268
private calculateAndUpdateState() {

packages/grpc-js/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@grpc/grpc-js",
3-
"version": "1.12.6",
3+
"version": "1.13.0",
44
"description": "gRPC Library for Node - pure JS implementation",
55
"homepage": "https://grpc.io/",
66
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",

0 commit comments

Comments
 (0)