Compare commits

...

9 Commits

Author SHA1 Message Date
yifeizhuang dfff9a9475 Bump version to 1.61.1 2024-02-02 17:57:14 +00:00
yifeizhuang df1bb36ea4 Update README etc to reference 1.61.1 2024-02-02 17:56:46 +00:00
yifeizhuang 1abdaf36e8
xds: fix NPE in wrr in TF state (#10875) 2024-02-01 10:53:19 -08:00
Sergii Tkachenko 529d0ab330 Bump version to 1.61.1-SNAPSHOT 2024-01-11 15:28:17 -08:00
Sergii Tkachenko f06abeb6fd Bump version to 1.61.0 2024-01-11 15:15:35 -08:00
Sergii Tkachenko 77005107aa Update README protoc references to 3.25.1 2024-01-11 15:12:39 -08:00
Sergii Tkachenko c639b8161b Update README etc to reference 1.61.0 2024-01-11 15:09:13 -08:00
yifeizhuang 560608100f
fix flaky xds test due to verification race (#10798) (#10808) 2024-01-10 13:25:56 -08:00
Terry Wilson 2531563a3e
okhttp: Ignore known conscrypt socket close issue (#10811) (#10812)
This stops an exception from being thrown when a known Conscrypt synchronization issue happens.
2024-01-10 12:41:35 -08:00
35 changed files with 99 additions and 69 deletions

View File

@ -44,8 +44,8 @@ For a guided tour, take a look at the [quick start
guide](https://grpc.io/docs/languages/java/quickstart) or the more explanatory [gRPC
basics](https://grpc.io/docs/languages/java/basics).
The [examples](https://github.com/grpc/grpc-java/tree/v1.60.0/examples) and the
[Android example](https://github.com/grpc/grpc-java/tree/v1.60.0/examples/android)
The [examples](https://github.com/grpc/grpc-java/tree/v1.61.1/examples) and the
[Android example](https://github.com/grpc/grpc-java/tree/v1.61.1/examples/android)
are standalone projects that showcase the usage of gRPC.
Download
@ -56,18 +56,18 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
<version>1.60.0</version>
<version>1.61.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>1.60.0</version>
<version>1.61.1</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>1.60.0</version>
<version>1.61.1</version>
</dependency>
<dependency> <!-- necessary for Java 9+ -->
<groupId>org.apache.tomcat</groupId>
@ -79,18 +79,18 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
Or for Gradle with non-Android, add to your dependencies:
```gradle
runtimeOnly 'io.grpc:grpc-netty-shaded:1.60.0'
implementation 'io.grpc:grpc-protobuf:1.60.0'
implementation 'io.grpc:grpc-stub:1.60.0'
runtimeOnly 'io.grpc:grpc-netty-shaded:1.61.1'
implementation 'io.grpc:grpc-protobuf:1.61.1'
implementation 'io.grpc:grpc-stub:1.61.1'
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
```
For Android client, use `grpc-okhttp` instead of `grpc-netty-shaded` and
`grpc-protobuf-lite` instead of `grpc-protobuf`:
```gradle
implementation 'io.grpc:grpc-okhttp:1.60.0'
implementation 'io.grpc:grpc-protobuf-lite:1.60.0'
implementation 'io.grpc:grpc-stub:1.60.0'
implementation 'io.grpc:grpc-okhttp:1.61.1'
implementation 'io.grpc:grpc-protobuf-lite:1.61.1'
implementation 'io.grpc:grpc-stub:1.61.1'
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
```
@ -99,7 +99,7 @@ For [Bazel](https://bazel.build), you can either
(with the GAVs from above), or use `@io_grpc_grpc_java//api` et al (see below).
[the JARs]:
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.60.0
https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.61.1
Development snapshots are available in [Sonatypes's snapshot
repository](https://oss.sonatype.org/content/repositories/snapshots/).
@ -129,9 +129,9 @@ For protobuf-based codegen integrated with the Maven build system, you can use
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.24.0:exe:${os.detected.classifier}</protocArtifact>
<protocArtifact>com.google.protobuf:protoc:3.25.1:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.60.0:exe:${os.detected.classifier}</pluginArtifact>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.61.1:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
<executions>
<execution>
@ -157,11 +157,11 @@ plugins {
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.24.0"
artifact = "com.google.protobuf:protoc:3.25.1"
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.60.0'
artifact = 'io.grpc:protoc-gen-grpc-java:1.61.1'
}
}
generateProtoTasks {
@ -190,11 +190,11 @@ plugins {
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.24.0"
artifact = "com.google.protobuf:protoc:3.25.1"
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.60.0'
artifact = 'io.grpc:protoc-gen-grpc-java:1.61.1'
}
}
generateProtoTasks {

View File

@ -21,7 +21,7 @@ subprojects {
apply plugin: "net.ltgt.errorprone"
group = "io.grpc"
version = "1.61.0-SNAPSHOT" // CURRENT_GRPC_VERSION
version = "1.61.1" // CURRENT_GRPC_VERSION
repositories {
maven { // The google mirror is less flaky than mavenCentral()

View File

@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
* </pre>
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.61.0-SNAPSHOT)",
value = "by gRPC proto compiler (version 1.61.1)",
comments = "Source: grpc/testing/compiler/test.proto")
@io.grpc.stub.annotations.GrpcGenerated
@java.lang.Deprecated

View File

@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
* </pre>
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.61.0-SNAPSHOT)",
value = "by gRPC proto compiler (version 1.61.1)",
comments = "Source: grpc/testing/compiler/test.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class TestServiceGrpc {

View File

@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
* </pre>
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.61.0-SNAPSHOT)",
value = "by gRPC proto compiler (version 1.61.1)",
comments = "Source: grpc/testing/compiler/test.proto")
@io.grpc.stub.annotations.GrpcGenerated
@java.lang.Deprecated

View File

@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
* </pre>
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.61.0-SNAPSHOT)",
value = "by gRPC proto compiler (version 1.61.1)",
comments = "Source: grpc/testing/compiler/test.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class TestServiceGrpc {

View File

@ -220,7 +220,7 @@ public final class GrpcUtil {
public static final Splitter ACCEPT_ENCODING_SPLITTER = Splitter.on(',').trimResults();
public static final String IMPLEMENTATION_VERSION = "1.61.0-SNAPSHOT"; // CURRENT_GRPC_VERSION
public static final String IMPLEMENTATION_VERSION = "1.61.1"; // CURRENT_GRPC_VERSION
/**
* The default timeout in nanos for a keepalive ping request.

View File

@ -34,7 +34,7 @@ android {
protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.25.1' }
plugins {
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.1' // CURRENT_GRPC_VERSION
}
}
generateProtoTasks {
@ -54,12 +54,12 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0'
// You need to build grpc-java to obtain these libraries below.
implementation 'io.grpc:grpc-okhttp:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-protobuf-lite:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-stub:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-okhttp:1.61.1' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-protobuf-lite:1.61.1' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-stub:1.61.1' // CURRENT_GRPC_VERSION
implementation 'org.apache.tomcat:annotations-api:6.0.53'
testImplementation 'junit:junit:4.13.2'
testImplementation 'com.google.truth:truth:1.1.5'
testImplementation 'io.grpc:grpc-testing:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
testImplementation 'io.grpc:grpc-testing:1.61.1' // CURRENT_GRPC_VERSION
}

View File

@ -32,7 +32,7 @@ android {
protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.25.1' }
plugins {
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.1' // CURRENT_GRPC_VERSION
}
}
generateProtoTasks {
@ -52,8 +52,8 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0'
// You need to build grpc-java to obtain these libraries below.
implementation 'io.grpc:grpc-okhttp:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-protobuf-lite:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-stub:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-okhttp:1.61.1' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-protobuf-lite:1.61.1' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-stub:1.61.1' // CURRENT_GRPC_VERSION
implementation 'org.apache.tomcat:annotations-api:6.0.53'
}

View File

@ -32,7 +32,7 @@ android {
protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.25.1' }
plugins {
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.1' // CURRENT_GRPC_VERSION
}
}
generateProtoTasks {
@ -52,8 +52,8 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0'
// You need to build grpc-java to obtain these libraries below.
implementation 'io.grpc:grpc-okhttp:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-protobuf-lite:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-stub:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-okhttp:1.61.1' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-protobuf-lite:1.61.1' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-stub:1.61.1' // CURRENT_GRPC_VERSION
implementation 'org.apache.tomcat:annotations-api:6.0.53'
}

View File

@ -33,7 +33,7 @@ android {
protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.25.1' }
plugins {
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.61.1' // CURRENT_GRPC_VERSION
}
}
generateProtoTasks {
@ -53,8 +53,8 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0'
// You need to build grpc-java to obtain these libraries below.
implementation 'io.grpc:grpc-okhttp:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-protobuf-lite:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-stub:1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-okhttp:1.61.1' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-protobuf-lite:1.61.1' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-stub:1.61.1' // CURRENT_GRPC_VERSION
implementation 'org.apache.tomcat:annotations-api:6.0.53'
}

View File

@ -23,7 +23,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
def protobufVersion = '3.25.1'
def protocVersion = protobufVersion

View File

@ -24,7 +24,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
dependencies {

View File

@ -25,7 +25,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
def protobufVersion = '3.25.1'
dependencies {

View File

@ -6,13 +6,13 @@
<packaging>jar</packaging>
<!-- Feel free to delete the comment at the end of these lines. It is just
for safely updating the version in our release process. -->
<version>1.61.0-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION -->
<version>1.61.1</version><!-- CURRENT_GRPC_VERSION -->
<name>example-debug</name>
<url>https://github.com/grpc/grpc-java</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.61.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<grpc.version>1.61.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protoc.version>3.25.1</protoc.version>
<!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source>

View File

@ -24,7 +24,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
def protobufVersion = '3.25.1'
def protocVersion = protobufVersion

View File

@ -6,13 +6,13 @@
<packaging>jar</packaging>
<!-- Feel free to delete the comment at the end of these lines. It is just
for safely updating the version in our release process. -->
<version>1.61.0-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION -->
<version>1.61.1</version><!-- CURRENT_GRPC_VERSION -->
<name>example-gauth</name>
<url>https://github.com/grpc/grpc-java</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.61.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<grpc.version>1.61.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protobuf.version>3.25.1</protobuf.version>
<!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source>

View File

@ -25,7 +25,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
dependencies {

View File

@ -23,7 +23,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
def protobufVersion = '3.25.1'
dependencies {

View File

@ -6,13 +6,13 @@
<packaging>jar</packaging>
<!-- Feel free to delete the comment at the end of these lines. It is just
for safely updating the version in our release process. -->
<version>1.61.0-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION -->
<version>1.61.1</version><!-- CURRENT_GRPC_VERSION -->
<name>example-hostname</name>
<url>https://github.com/grpc/grpc-java</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.61.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<grpc.version>1.61.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protoc.version>3.25.1</protoc.version>
<!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source>

View File

@ -23,7 +23,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
def protobufVersion = '3.25.1'
def protocVersion = protobufVersion

View File

@ -7,13 +7,13 @@
<packaging>jar</packaging>
<!-- Feel free to delete the comment at the end of these lines. It is just
for safely updating the version in our release process. -->
<version>1.61.0-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION -->
<version>1.61.1</version><!-- CURRENT_GRPC_VERSION -->
<name>example-jwt-auth</name>
<url>https://github.com/grpc/grpc-java</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.61.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<grpc.version>1.61.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protobuf.version>3.25.1</protobuf.version>
<protoc.version>3.25.1</protoc.version>
<!-- required for jdk9 -->

View File

@ -23,7 +23,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
def protobufVersion = '3.25.1'
def protocVersion = protobufVersion

View File

@ -7,13 +7,13 @@
<packaging>jar</packaging>
<!-- Feel free to delete the comment at the end of these lines. It is just
for safely updating the version in our release process. -->
<version>1.61.0-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION -->
<version>1.61.1</version><!-- CURRENT_GRPC_VERSION -->
<name>example-oauth</name>
<url>https://github.com/grpc/grpc-java</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.61.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<grpc.version>1.61.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protobuf.version>3.25.1</protobuf.version>
<protoc.version>3.25.1</protoc.version>
<!-- required for jdk9 -->

View File

@ -18,7 +18,7 @@ java {
targetCompatibility = JavaVersion.VERSION_1_8
}
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
dependencies {

View File

@ -18,7 +18,7 @@ java {
targetCompatibility = JavaVersion.VERSION_1_8
}
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
dependencies {

View File

@ -16,7 +16,7 @@ java {
targetCompatibility = JavaVersion.VERSION_1_8
}
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
dependencies {

View File

@ -24,7 +24,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
dependencies {

View File

@ -6,13 +6,13 @@
<packaging>jar</packaging>
<!-- Feel free to delete the comment at the end of these lines. It is just
for safely updating the version in our release process. -->
<version>1.61.0-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION -->
<version>1.61.1</version><!-- CURRENT_GRPC_VERSION -->
<name>example-tls</name>
<url>https://github.com/grpc/grpc-java</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.61.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<grpc.version>1.61.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protoc.version>3.25.1</protoc.version>
<!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source>

View File

@ -23,7 +23,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.61.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def grpcVersion = '1.61.1' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
dependencies {

View File

@ -6,13 +6,13 @@
<packaging>jar</packaging>
<!-- Feel free to delete the comment at the end of these lines. It is just
for safely updating the version in our release process. -->
<version>1.61.0-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION -->
<version>1.61.1</version><!-- CURRENT_GRPC_VERSION -->
<name>examples</name>
<url>https://github.com/grpc/grpc-java</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.61.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<grpc.version>1.61.1</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protobuf.version>3.25.1</protobuf.version>
<protoc.version>3.25.1</protoc.version>
<!-- required for JDK 8 -->

View File

@ -1098,6 +1098,7 @@ class OkHttpClientTransport implements ConnectionClientTransport, TransportExcep
}
@Override
@SuppressWarnings("Finally")
public void run() {
String threadName = Thread.currentThread().getName();
Thread.currentThread().setName("OkHttpClientTransport");
@ -1130,6 +1131,15 @@ class OkHttpClientTransport implements ConnectionClientTransport, TransportExcep
frameReader.close();
} catch (IOException ex) {
log.log(Level.INFO, "Exception closing frame reader", ex);
} catch (RuntimeException e) {
// This same check is done in okhttp proper:
// https://github.com/square/okhttp/blob/3cc0f4917cbda03cb31617f8ead1e0aeb19de2fb/okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt#L270
// Conscrypt in Android 10 and 11 may throw closing an SSLSocket. This is safe to ignore.
// https://issuetracker.google.com/issues/177450597
if (!"bio == null".equals(e.getMessage())) {
throw e;
}
}
listener.transportTerminated();
Thread.currentThread().setName(threadName);

View File

@ -378,6 +378,9 @@ final class WeightedRoundRobinLoadBalancer extends RoundRobinLoadBalancer {
WeightedChildLbState wChild = (WeightedChildLbState) childLbState;
PickResult pickResult = childLbState.getCurrentPicker().pickSubchannel(args);
Subchannel subchannel = pickResult.getSubchannel();
if (subchannel == null) {
return pickResult;
}
if (!enableOobLoadReport) {
return PickResult.withSubchannel(subchannel,
OrcaPerRequestUtil.getInstance().newOrcaClientStreamTracerFactory(

View File

@ -47,6 +47,7 @@ import io.grpc.LoadBalancer.ResolvedAddresses;
import io.grpc.LoadBalancer.Subchannel;
import io.grpc.LoadBalancer.SubchannelPicker;
import io.grpc.LoadBalancer.SubchannelStateListener;
import io.grpc.Status;
import io.grpc.SynchronizationContext;
import io.grpc.internal.FakeClock;
import io.grpc.internal.TestUtils;
@ -162,6 +163,22 @@ public class WeightedRoundRobinLoadBalancerTest {
verify(helper, times(3)).createSubchannel(any(CreateSubchannelArgs.class));
}
@Test
public void pickChildLbTF() throws Exception {
syncContext.execute(() -> wrr.acceptResolvedAddresses(ResolvedAddresses.newBuilder()
.setAddresses(servers.subList(0, 1)).setLoadBalancingPolicyConfig(weightedConfig)
.setAttributes(affinity).build()));
Iterator<Subchannel> it = subchannels.values().iterator();
Subchannel readySubchannel1 = it.next();
getSubchannelStateListener(readySubchannel1).onSubchannelState(ConnectivityStateInfo
.forTransientFailure(Status.UNAVAILABLE));
verify(helper).updateBalancingState(
eq(ConnectivityState.TRANSIENT_FAILURE), pickerCaptor.capture());
final WeightedRoundRobinPicker weightedPicker =
(WeightedRoundRobinPicker) pickerCaptor.getValue();
weightedPicker.pickSubchannel(mockArgs);
}
@Test
public void wrrLifeCycle() {
syncContext.execute(() -> wrr.acceptResolvedAddresses(ResolvedAddresses.newBuilder()

View File

@ -3010,10 +3010,10 @@ public abstract class XdsClientImplTestBase {
+ "Cluster cluster.googleapis.com2: unspecified cluster discovery type";
call.verifyRequestNack(CDS, Arrays.asList(CDS_RESOURCE, anotherCdsResource), VERSION_1, "0001",
NODE, Arrays.asList(errorMsg));
verify(anotherWatcher).onResourceDoesNotExist(eq(anotherCdsResource));
barrier.await();
latch.await(10, TimeUnit.SECONDS);
verify(cdsResourceWatcher, times(2)).onChanged(any());
verify(anotherWatcher).onResourceDoesNotExist(eq(anotherCdsResource));
verify(anotherWatcher).onError(any());
}