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

spanner: parallelize session creation #333

Merged

Conversation

danielnorberg
Copy link
Contributor

Parallelize spanner session creation as proposed in #323 (comment)

@danielnorberg danielnorberg force-pushed the dano/spanner-parallel-session-creation branch from a284e84 to 04c86d6 Compare December 22, 2024 05:42
for _ in 0..channel_num {
// Ensure that we create the exact number of requested sessions by adding the remainder to the first channel.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also took the opportunity to implement the same exact session creation as the golang client: https://github.com/googleapis/google-cloud-go/blob/7cbffad749a0f8917658406dae73c7fb7151b55d/spanner/sessionclient.go#L221

Ran into this during testing when creating a client where channel_num > min_opened.

@yoshidan yoshidan added the safe to test safe to test label Dec 29, 2024
@yoshidan
Copy link
Owner

Thank you for your contribution.

@yoshidan yoshidan merged commit be627ee into yoshidan:main Dec 29, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test safe to test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants