-
Notifications
You must be signed in to change notification settings - Fork 374
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
Conversation
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.
Codecov ReportPatch coverage:
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
☔ View full report in Codecov by Sentry. |
// 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"}) { |
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.
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.
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.
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.
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