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

feat(spanner): enable leader aware routing by default #12319

Merged
merged 2 commits into from
Aug 4, 2023

Conversation

devbww
Copy link
Contributor

@devbww devbww commented Aug 4, 2023

I've been told to include this text in the PR description:

"This update contains performance optimisations that will reduce the latency of read/write transactions that originate from a region other than the default leader region."

See #11112. Fixes #11111.


This change is Reviewable

I've been told to include this text in the PR description:

"This update contains performance optimisations that will reduce the
latency of read/write transactions that originate from a region other
than the default leader region."

See googleapis#11112.  Fixes googleapis#11111.
@devbww devbww temporarily deployed to internal August 4, 2023 18:21 — with GitHub Actions Inactive
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Aug 4, 2023
@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (e814f61) 93.54% compared to head (5f6c510) 93.54%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12319   +/-   ##
=======================================
  Coverage   93.54%   93.54%           
=======================================
  Files        2017     2017           
  Lines      178384   178380    -4     
=======================================
- Hits       166863   166860    -3     
+ Misses      11521    11520    -1     
Files Changed Coverage Δ
google/cloud/spanner/internal/defaults.cc 97.43% <100.00%> (-0.10%) ⬇️
google/cloud/spanner/internal/defaults_test.cc 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

// The option defaults to on (unset), but the default can be changed with a
// suitably-negative value in `${GOOGLE_CLOUD_CPP_SPANNER_ROUTE_TO_LEADER}`.
if (auto e = internal::GetEnv("GOOGLE_CLOUD_CPP_SPANNER_ROUTE_TO_LEADER")) {
for (auto const* disable : {"N", "n", "F", "f", "0", "off"}) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it me, or we have used this sequence of values elsewhere? Should we have a function? And why not OFF, since we have N and n?
Neither of those questions is blockin.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we have ParseBoolean() in google/cloud/tracing_options.cc, which we could probably try to common-ize now.

As for the values, I just stuck with the ParseBoolean() choices, so that refactoring was a possibility.

@devbww devbww temporarily deployed to internal August 4, 2023 19:25 — with GitHub Actions Inactive
@devbww devbww marked this pull request as ready for review August 4, 2023 20:10
@devbww devbww requested a review from a team as a code owner August 4, 2023 20:10
@devbww devbww merged commit 4dda714 into googleapis:main Aug 4, 2023
52 checks passed
@devbww devbww deleted the route-to-leader branch August 4, 2023 20:58
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 Spanner API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

change spanner::RouteToLeaderOption to be on by default
2 participants