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 — Changes default value for writeSessionFraction to 0. by vkedia · Pull Request #2611 · googleapis/google-cloud-java

Conversation

@vkedia

@vkedia vkedia commented Nov 10, 2017

Copy link
Copy Markdown

Closes #2540

Sorry, something went wrong.

Uh oh!

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

All reactions
@vkedia
Changes default value for writeSessionFraction to 0.
8fb1421
@vkedia
vkedia requested a review from garrettjonesgoogle as a code owner November 10, 2017 20:35
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 10, 2017
@vkedia
vkedia requested a review from vam-google November 10, 2017 20:35
@vkedia

vkedia commented Nov 10, 2017

Copy link
Copy Markdown
Author

cc @tomayles

All reactions

Sorry, something went wrong.

Uh oh!

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

@vkedia
Added some tests for SessionPoolOptions
fb14001
tomayles
tomayles reviewed Nov 13, 2017
View reviewed changes
Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java Outdated
private int maxSessions = DEFAULT_MAX_SESSIONS;
private int maxIdleSessions;
private float writeSessionsFraction = 0.2f;
private float writeSessionsFraction = 0.f;

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

@tomayles

tomayles commented Nov 13, 2017 via email

Copy link
Copy Markdown
On Mon, Nov 13, 2017 at 2:26 PM, Vikas Kedia ***@***.***> wrote: ***@***.**** commented on this pull request. ------------------------------ In google-cloud-spanner/src/main/java/com/google/cloud/spanner/ SessionPoolOptions.java <#2611 (comment)> : > @@ -81,7 +81,7 @@ public static Builder newBuilder() { private int minSessions; private int maxSessions = DEFAULT_MAX_SESSIONS; private int maxIdleSessions; - private float writeSessionsFraction = 0.2f; + private float writeSessionsFraction = 0.f; That's correct. But I think anyone who cares about performance improvements provided by this parameter would anyways need to tune this according to there read/write ratio. 0.2 is pretty arbitrary. OTOH setting this to >0 does lead to a bad experience in the case where BeginTransaction is guaranteed to fail such as permission denied.
It's arbitrary, but likely a reasonable guess for a lot of users based on the mix of read-write to read-only transaction usage we see. I would strongly prefer that the libraries enable good performance by default, without needing to discover the tuning parameters. As an alternative, should we disable the feature if we see that 100% of the first N BeginTxn calls fail with this error?
…
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2611 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ANejN_tbXhCKXMpOMFJNO4higdDGehElks5s2MIagaJpZM4QaE3S> .
All reactions

Sorry, something went wrong.

Uh oh!

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

@vkedia

vkedia commented Nov 14, 2017

Copy link
Copy Markdown
Author

@tomayles We can do what you suggested but I am not sure adding that complexity is worth it.
Here is another idea. What if we figure out on the client based on the usage what percent of sessions need to be write prepared and then we prepare that many sessions. We can adaptively change the ratio based on usage over some window. Then we can remove this writePrepared parameter and have a single boolean parameter to turn this feature on/off (with default being on). That will help the client home in to the correct ratio and also resolve this issue since the ratio will be 0 in this case.

All reactions

Sorry, something went wrong.

Uh oh!

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

@tomayles

tomayles commented Nov 14, 2017 via email

Copy link
Copy Markdown
That sounds good too. At first glance, it seems that it could be more complex, but having the client auto-tune is very appealing. If we want to preserve the existing API, we could keep writefraction as an override, but have it default to a sentinel value that means auto.
…
On Tue, Nov 14, 2017 at 10:40 AM, Vikas Kedia ***@***.***> wrote: @tomayles <https://github.com/tomayles> We can do what you suggested but I am not sure adding that complexity is worth it. Here is another idea. What if we figure out on the client based on the usage what percent of sessions need to be write prepared and then we prepare that many sessions. We can adaptively change the ratio based on usage over some window. Then we can remove this writePrepared parameter and have a single boolean parameter to turn this feature on/off (with default being on). That will help the client home in to the correct ratio and also resolve this issue since the ratio will be 0 in this case. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2611 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ANejN1wK26iN0H18pihHlenIXrU3qClGks5s2d6pgaJpZM4QaE3S> .
All reactions

Sorry, something went wrong.

Uh oh!

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

@vkedia

vkedia commented Nov 14, 2017

Copy link
Copy Markdown
Author

Ok. I will then close this pull request and file an issue for auto tuning write fractions

All reactions

Sorry, something went wrong.

Uh oh!

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

@vkedia

vkedia commented Nov 14, 2017

Copy link
Copy Markdown
Author

Filed #2624

All reactions

Sorry, something went wrong.

Uh oh!

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

@vkedia vkedia closed this Nov 14, 2017
@vkedia
vkedia deleted the write-fractions-default branch November 14, 2017 19:39
chingor13 pushed a commit that referenced this pull request Feb 20, 2026
@PhongChuong
chore: update owlbot config: deep-preserve-regex to include Telemetry…
21245d0
…Metrics.java (#2611)
chingor13 pushed a commit that referenced this pull request Mar 24, 2026
@JoeWang1127
chore: update renovate to explicitly ignore workflow files (#2611)
bf99800
Port template change in
googleapis/synthtool#1945
chingor13 pushed a commit that referenced this pull request Mar 30, 2026
@diegomarquezp
chore: update hermetic_library_generation.yaml (#2611)
01e181e
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
@michaelpri10
deps: Remove OpenTelemetry semconv dependency (#2611)
240fc37
* deps: Remove OpenTelemetry semconv dependency

* chore: Fix formatting
meltsufin pushed a commit that referenced this pull request May 1, 2026
@michaelpri10
deps: Remove OpenTelemetry semconv dependency (#2611)
7288658
* deps: Remove OpenTelemetry semconv dependency

* chore: Fix formatting
rahul2393 pushed a commit to akash329d/google-cloud-java that referenced this pull request May 21, 2026
@suztomo
ci: allow nonexistent profile in google-cloud-bigtable (googleapis#2611)
ce92db2
Our new release job script specifies profiles that might not exist in all Java projects in our release pipeline. The requireProfileIdsExist enforcer rule fails in that case.

```
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (enforce-valid-profile) on project google-cloud-bigtable: 
[ERROR] Rule 0: org.apache.maven.enforcer.rules.RequireProfileIdsExist failed with message:
[ERROR] The requested profile doesn't exist: release-staging-repository
```

Therefore, let's disable the requireProfileIdsExist rule during the release. This change created a profile that does that:

```
    <profile>
      <id>enable-enforcer-rules</id>
      <activation>
        <property>
          <!-- By default, Maven runs the enforcer rules. The shared release script
            may pass profile name that doesn't exist in this project. Let's ignore
            the enforcer rule (requireProfileIdsExist) in that case, leveraging
            the presence of the performRelease property. -->
          <name>!performRelease</name>
        </property>
...
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@garrettjonesgoogle garrettjonesgoogle Awaiting requested review from garrettjonesgoogle
@vam-google vam-google Awaiting requested review from vam-google
1 more reviewer
@tomayles tomayles tomayles left review comments
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

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

3 participants

@vkedia @tomayles @googlebot
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.