Skip to content
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

chore: add a random channel hint with single use transactions while u… #3065

Merged
merged 3 commits into from Apr 30, 2024

Conversation

arpan14
Copy link
Collaborator

@arpan14 arpan14 commented Apr 26, 2024

Without the hint, GAX would do a round-robin on channels. In theory, a random hint would give a better performance than round robin at a high QPS workload. Also YCSB benchmarks suggest having the hint is better for higher QPS.

@arpan14 arpan14 requested a review from a team as a code owner April 26, 2024 19:49
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: spanner Issues related to the googleapis/java-spanner API. labels Apr 26, 2024
@arpan14 arpan14 requested a review from olavloite April 26, 2024 19:51
@arpan14 arpan14 added the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 29, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 29, 2024
Comment on lines 193 to 195
// with a multiplexed session. But GAX currently uses an AtomicLong to perform round-robin
// channel selection and that will cause contention issues at high-concurrency. So we are
// passing a random hint instead of doing GAX round-robin.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this/replace this comment. Gax uses an AtomicInteger to implement round-robin, and that does not introduce any contention.

@arpan14 arpan14 added the automerge Merge the pull request once unit tests and other checks pass. label Apr 30, 2024
@harshachinta harshachinta added the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 30, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 30, 2024
@gcf-merge-on-green gcf-merge-on-green bot merged commit 42650fa into googleapis:main Apr 30, 2024
31 of 32 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants