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

fix(spanner): make Priority in QueryOptions effective and add some related tests. #6263

Merged
merged 3 commits into from
Jul 4, 2022

Conversation

tomo241
Copy link
Contributor

@tomo241 tomo241 commented Jun 26, 2022

Priority in QueryOptions is not considered in some functions in spanner/transaction.go. Currently, the following default Priority setting doesn't work and the read query is still run as high priority. I'm also adding some tests to check the effectiveness of the Priority setting.

client, err := spanner.NewClientWithConfig(ctx, dbPath, spanner.ClientConfig{
	QueryOptions: spanner.QueryOptions{Priority: sppb.RequestOptions_PRIORITY_MEDIUM},
})
 :
iter := client.Single().Query(ctx, stmt)
err = iter.Do(func(r *Row) error { return nil })

@tomo241 tomo241 requested review from a team as code owners June 26, 2022 14:22
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Jun 26, 2022
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 26, 2022
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 26, 2022
@rahul2393 rahul2393 changed the title Make Priority in QueryOptions effective and add some related tests. fix: make Priority in QueryOptions effective and add some related tests. Jun 26, 2022
@rahul2393 rahul2393 changed the title fix: make Priority in QueryOptions effective and add some related tests. fix(spanner): make Priority in QueryOptions effective and add some related tests. Jun 27, 2022
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Jun 27, 2022
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 4, 2022
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 4, 2022
@rahul2393 rahul2393 merged commit f72abfe into googleapis:main Jul 4, 2022
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. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants