-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add gRPC-GCP channel pool as an option #1227
Conversation
This allows sessions to be spread across channels when the Spanner client starts up.
This enables a user to opt-in for using the gRPC-GCP extension channel pool and configure its options.
google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/resources/com/google/cloud/spanner/spi/v1/grpc-gcp-apiconfig.json
Show resolved
Hide resolved
google-cloud-spanner/src/main/resources/com/google/cloud/spanner/spi/v1/grpc-gcp-apiconfig.json
Show resolved
Hide resolved
google-cloud-spanner/src/main/resources/com/google/cloud/spanner/spi/v1/grpc-gcp-apiconfig.json
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java
Show resolved
Hide resolved
# Conflicts: # google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java # google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java
Show resolved
Hide resolved
In order to fix the failed lint check you need to run the following command:
|
<dependency> | ||
<groupId>com.google.cloud</groupId> | ||
<artifactId>grpc-gcp</artifactId> | ||
<version>1.0.0</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We tend to use the versions specified in java-shared-dependencies. By that, I mean we usually do NOT specify version dependencies (like here), but instead rely on the versions provided by the POM import of that repository.
Could we do the same for this artifact (if it is part of any BOMs specified in the shared dependencies)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not a part of any BOMs. If I add it to the java-shared-dependencies will all the projects depending on it automatically get grpc-gcp as a dependency or they must explicitly add it to their dependencies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They must explicitly add it to their dependencies, but they won't need to specify a version. This makes sure that we are always using compatible library versions.
Also, could we have a couple of tests for this feature that:
|
Added.
For the GAX channel pool it is important which
Can you give me a hint on how it is easier to test the last two, please? |
@nimf I can't push any changes to your branch, so I'll attach a proposal for a test as an attachment here. Please feel free to make any changes you think would be appropriate to the test. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
Wow, it's perfect! Thank you so much! I've added you as the author, but now it requires a consent. Can you give your consent, please? |
Add gRPC-GCP extension library to shared dependencies. This will be used by the Spanner client first: googleapis/java-spanner#1227
@googlebot I consent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I assume the 1.0.0 version for the grpc-gcp in the pom.xml can be removed once the shared dependencies with this dependency included has been released (?)
Yes, exactly. I've already added grpc-gcp to the java-shared-dependencies but it hasn't been released yet. |
Add gRPC-GCP extension library to shared dependencies. This will be used by the Spanner client first: googleapis/java-spanner#1227
This enables a user to opt-in for using the gRPC-GCP channel pool and configure its options.
For example:
The gRPC-GCP channel pool provides a couple resiliency improvements during some networking issues. It also provides additional channel pool metrics.