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: Leader aware routing #1783

Merged
merged 16 commits into from Apr 26, 2023
Merged

feat: Leader aware routing #1783

merged 16 commits into from Apr 26, 2023

Conversation

surbhigarg92
Copy link
Contributor

@surbhigarg92 surbhigarg92 commented Jan 31, 2023

Add x-goog-spanner-route-to-leader header to Spanner RPC contexts for RW/PDML transactions. The header is added to support leader-aware-routing feature, which aims at reducing cross-regional latency for RW/PDML transactions in a multi-region instance.

This feature is off by default and can be enabled by setting routeToLeaderEnabled as true while creating Spanner object.

const spanner = new Spanner({
    projectId: projectId,
    routeToLeaderEnabled: true,
  });

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/nodejs-spanner API. labels Jan 31, 2023
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Feb 1, 2023
@surbhigarg92 surbhigarg92 marked this pull request as ready for review February 21, 2023 10:40
@surbhigarg92 surbhigarg92 requested review from a team as code owners February 21, 2023 10:40
src/index.ts Outdated Show resolved Hide resolved
@surbhigarg92 surbhigarg92 added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Feb 27, 2023
src/batch-transaction.ts Outdated Show resolved Hide resolved
src/batch-transaction.ts Outdated Show resolved Hide resolved
src/database.ts Outdated Show resolved Hide resolved
src/database.ts Outdated Show resolved Hide resolved
src/transaction.ts Show resolved Hide resolved
test/spanner.ts Show resolved Hide resolved
test/spanner.ts Outdated Show resolved Hide resolved
src/batch-transaction.ts Show resolved Hide resolved
@surbhigarg92 surbhigarg92 removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Apr 26, 2023
@surbhigarg92 surbhigarg92 added the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 26, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 26, 2023
@surbhigarg92 surbhigarg92 merged commit 0703f41 into googleapis:main Apr 26, 2023
16 checks passed
@surbhigarg92 surbhigarg92 deleted the lar branch October 23, 2023 11:40
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/nodejs-spanner API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants