GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: increase default number of channels when gRPC-GCP channel pool is enabled by harshachinta · Pull Request #1997 · googleapis/java-spanner

This repository was archived by the owner on Aug 30, 2026. It is now read-only.

Conversation

@harshachinta

@harshachinta harshachinta commented Sep 6, 2022

Copy link
Copy Markdown
Contributor

Fixes #1566

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
harshachinta added 2 commits September 6, 2022 05:21
@harshachinta
increase default number of channels when grpc-gcp channel pool is ena…
4b44b1a
…bled
@harshachinta
Merge remote-tracking branch 'origin/main'
34d7623
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner API. labels Sep 6, 2022
@harshachinta
add java file header
860462a
rajatbhatta
rajatbhatta suggested changes Sep 6, 2022
View reviewed changes
Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/test/java/com/google/cloud/spanner/DefaultNumChannelsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

rajatbhatta
rajatbhatta reviewed Sep 6, 2022
View reviewed changes
Comment thread google-cloud-spanner/src/test/java/com/google/cloud/spanner/DefaultNumChannelsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@rajatbhatta

rajatbhatta commented Sep 6, 2022

Copy link
Copy Markdown
Contributor

Try running mvn com.coveo:fmt-maven-plugin:format to get rid of linting errors.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rajatbhatta
rajatbhatta suggested changes Sep 6, 2022
View reviewed changes
Comment thread google-cloud-spanner/src/test/java/com/google/cloud/spanner/DefaultNumChannelsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/test/java/com/google/cloud/spanner/DefaultNumChannelsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/test/java/com/google/cloud/spanner/DefaultNumChannelsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/test/java/com/google/cloud/spanner/DefaultNumChannelsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

harshachinta added 3 commits September 6, 2022 09:47
@harshachinta
increase default number of channels when grpc-gcp channel pool is ena…
f2e2d8f
…bled
@harshachinta
fix lint issue
15e3155
@harshachinta
fix lint issue
7a3ed3c
@harshachinta
harshachinta marked this pull request as ready for review September 7, 2022 09:40
@harshachinta
harshachinta requested a review from a team September 7, 2022 09:40
rajatbhatta
rajatbhatta suggested changes Sep 7, 2022
View reviewed changes
Comment thread google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

rajatbhatta
rajatbhatta suggested changes Sep 7, 2022
View reviewed changes
Comment thread google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@harshachinta
code fixes
1449429
rajatbhatta
rajatbhatta reviewed Sep 7, 2022
View reviewed changes
Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

rajatbhatta
rajatbhatta reviewed Sep 7, 2022
View reviewed changes
Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

rajatbhatta added 2 commits September 7, 2022 19:21
@rajatbhatta
Update google-cloud-spanner/src/main/java/com/google/cloud/spanner/Sp…
5f516cb
…annerOptions.java
@rajatbhatta
Update google-cloud-spanner/src/main/java/com/google/cloud/spanner/Sp…
afec666
…annerOptions.java
@rajatbhatta
rajatbhatta requested a review from olavloite September 7, 2022 13:53
ansh0l
ansh0l reviewed Sep 7, 2022
View reviewed changes
Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

harshachinta and others added 4 commits September 8, 2022 10:49
@harshachinta
lint fixes
1fe3d48
@harshachinta
Merge remote-tracking branch 'origin/main'
60cfa2a
@harshachinta
Modify comments for better code readability
e68b2f5
@harshachinta
lint fix
a334e09
olavloite
olavloite reviewed Oct 11, 2022
View reviewed changes
Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

harshachinta added 2 commits October 11, 2022 13:35
@harshachinta
add test to verify default num of channels when gRPC-GCP is not enabled
27962ea
@harshachinta
Add tests to verify number of channels and the instances created
68e72d4
@harshachinta
harshachinta requested review from ansh0l, olavloite and rajatbhatta and removed request for ansh0l and olavloite October 18, 2022 09:29
@rajatbhatta rajatbhatta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 18, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 18, 2022
@rajatbhatta rajatbhatta added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Oct 18, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 18, 2022
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 18, 2022
@gcf-owl-bot
🦉 Updates from OwlBot post-processor
33682fc
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
@gcf-owl-bot
gcf-owl-bot Bot requested a review from a team October 18, 2022 11:28
@harshachinta
harshachinta requested review from olavloite and removed request for rajatbhatta October 18, 2022 13:00
olavloite
olavloite approved these changes Oct 19, 2022
View reviewed changes

@olavloite olavloite left a comment

Copy link
Copy Markdown
Contributor

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.

Small nit on setting the default numChannels, otherwise LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Outdated
Comment on lines +1139 to +1141
if (this.numChannels == null) {
this.numChannels = GRPC_GCP_ENABLED_DEFAULT_CHANNELS;
}

@olavloite olavloite Oct 19, 2022

Copy link
Copy Markdown
Contributor

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.

Remove this and instead assign the default number of channels in the build method for both GCP enabled and disabled. (See also below)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java Outdated
this.setCredentials(NoCredentials.getInstance());
}
if (this.numChannels == null) {
this.numChannels = DEFAULT_CHANNELS;

@olavloite olavloite Oct 19, 2022

Copy link
Copy Markdown
Contributor

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.

this.num

Suggested change
this.numChannels = DEFAULT_CHANNELS;
this.numChannels = this.grpcGcpExtensionEnabled ? GRPC_GCP_ENABLED_DEFAULT_CHANNELS : DEFAULT_CHANNELS;

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@harshachinta harshachinta Oct 19, 2022

Copy link
Copy Markdown
Contributor Author

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.

Thanks for the suggestion @olavloite. This makes it more readable than the previous one.
I have made the changes in the recent commit.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
harshachinta added 2 commits October 19, 2022 09:53
@harshachinta
code refactoring for setting the default numChannels
faa74ed
@harshachinta
Merge remote-tracking branch 'origin/main'
3d81b1f
rajatbhatta
rajatbhatta approved these changes Oct 19, 2022
View reviewed changes
@harshachinta
lint fix
a88d4e3
@rajatbhatta rajatbhatta added the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 19, 2022
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 19, 2022
@rajatbhatta rajatbhatta added the automerge Merge the pull request once unit tests and other checks pass. label Oct 19, 2022
@rajatbhatta
rajatbhatta merged commit 44f27fc into googleapis:main Oct 19, 2022
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Oct 19, 2022
@release-please release-please Bot mentioned this pull request Oct 19, 2022
chore(main): release 6.32.0 #2115
Merged
gcf-merge-on-green Bot pushed a commit that referenced this pull request Oct 28, 2022
@release-please
chore(main): release 6.32.0 (#2115)
6359c4c
🤖 I have created a release *beep* *boop*
---


## [6.32.0](https://togithub.com/googleapis/java-spanner/compare/v6.31.2...v6.32.0) (2022-10-27)


### Features

* Enable client to server compression ([#2117](https://togithub.com/googleapis/java-spanner/issues/2117)) ([50f8425](https://togithub.com/googleapis/java-spanner/commit/50f8425fe9e1db16ed060337d26feccc9a9813e2))
* Increase default number of channels when gRPC-GCP channel pool is enabled ([#1997](https://togithub.com/googleapis/java-spanner/issues/1997)) ([44f27fc](https://togithub.com/googleapis/java-spanner/commit/44f27fc90fa3f9f4914574fb0476e971da4c02ff))
* Update result_set.proto to return undeclared parameters in ExecuteSql API ([#2101](https://togithub.com/googleapis/java-spanner/issues/2101)) ([826eb93](https://togithub.com/googleapis/java-spanner/commit/826eb9305095db064f52a15dc502bc0e0df9a984))


### Dependencies

* Update dependency com.google.cloud:google-cloud-monitoring to v3.4.6 ([#2093](https://togithub.com/googleapis/java-spanner/issues/2093)) ([b08db44](https://togithub.com/googleapis/java-spanner/commit/b08db443229afdc1d49ef9f5e459cade5e2abe90))
* Update dependency com.google.cloud:google-cloud-monitoring to v3.5.0 ([#2113](https://togithub.com/googleapis/java-spanner/issues/2113)) ([99d825b](https://togithub.com/googleapis/java-spanner/commit/99d825b18397ff9e8633b89effa05e61159d956f))
* Update dependency com.google.cloud:google-cloud-monitoring to v3.6.0 ([#2125](https://togithub.com/googleapis/java-spanner/issues/2125)) ([7d86fe4](https://togithub.com/googleapis/java-spanner/commit/7d86fe40de29311ad65bd382e55f75326d16c4e3))
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.5 ([#2122](https://togithub.com/googleapis/java-spanner/issues/2122)) ([308a65c](https://togithub.com/googleapis/java-spanner/commit/308a65c3e07e33f82b7ce474e0e95099192bb593))
* Update dependency com.google.cloud:google-cloud-trace to v2.3.7 ([#2094](https://togithub.com/googleapis/java-spanner/issues/2094)) ([6ec3f3f](https://togithub.com/googleapis/java-spanner/commit/6ec3f3f585ed5eaecdb09d5fd1eb6c9af3b22555))
* Update dependency com.google.cloud:google-cloud-trace to v2.4.0 ([#2114](https://togithub.com/googleapis/java-spanner/issues/2114)) ([84347f1](https://togithub.com/googleapis/java-spanner/commit/84347f1c6a52f3dfe569649f061cb16e2e466f6a))
* Update dependency com.google.cloud:google-cloud-trace to v2.5.0 ([#2126](https://togithub.com/googleapis/java-spanner/issues/2126)) ([5167928](https://togithub.com/googleapis/java-spanner/commit/516792809cf976aeab10709ca62503b7f03bb333))
* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.15 ([#2109](https://togithub.com/googleapis/java-spanner/issues/2109)) ([bf092ad](https://togithub.com/googleapis/java-spanner/commit/bf092ad7ac86c500e8a445397e192cb8fb0594ae))
* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.16 ([#2119](https://togithub.com/googleapis/java-spanner/issues/2119)) ([b2d27e8](https://togithub.com/googleapis/java-spanner/commit/b2d27e8f841cab096d5ccad64a250c7f0b35f670))
* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.15 ([#2110](https://togithub.com/googleapis/java-spanner/issues/2110)) ([d28b202](https://togithub.com/googleapis/java-spanner/commit/d28b202cfc29e8fbbfdf3612b94bab5c2f319419))
* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.16 ([#2120](https://togithub.com/googleapis/java-spanner/issues/2120)) ([151cf77](https://togithub.com/googleapis/java-spanner/commit/151cf778ff76edaee9e849181f72119ffa6cb897))
* Update dependency org.graalvm.sdk:graal-sdk to v22.2.0.1 ([#2102](https://togithub.com/googleapis/java-spanner/issues/2102)) ([68c2089](https://togithub.com/googleapis/java-spanner/commit/68c2089101124b9887af57b2697c35a64eb1a51f))
* Update dependency org.graalvm.sdk:graal-sdk to v22.3.0 ([#2116](https://togithub.com/googleapis/java-spanner/issues/2116)) ([9d6930b](https://togithub.com/googleapis/java-spanner/commit/9d6930b77ec479e5f517236852244476c23dc5c8))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

3 more reviewers
@ansh0l ansh0l ansh0l left review comments
@olavloite olavloite olavloite approved these changes
@rajatbhatta rajatbhatta rajatbhatta approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: spanner Issues related to the googleapis/java-spanner API. size: m Pull request size is medium.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Provision more channels with fewer sessions in each when using gRPC-GCP channel pool

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@harshachinta @rajatbhatta @olavloite @ansh0l @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.