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

Enable Spanner Request Priority argument in queries / sessions #248

Closed
awertman opened this issue Sep 22, 2022 · 1 comment · Fixed by #286
Closed

Enable Spanner Request Priority argument in queries / sessions #248

awertman opened this issue Sep 22, 2022 · 1 comment · Fixed by #286
Assignees
Labels
api: spanner Issues related to the googleapis/python-spanner-sqlalchemy API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@awertman
Copy link

The standard cloud spanner python API enables a RequestOptions parameter in requests which can be used to set request Priorities.

https://cloud.google.com/python/docs/reference/spanner/latest/google.cloud.spanner_v1.types.RequestOptions
https://cloud.google.com/python/docs/reference/spanner/latest/google.cloud.spanner_v1.types.RequestOptions.Priority

https://github.com/googleapis/python-spanner/blob/474b1b56cd11bc22d274a85664b09532a576e3d6/tests/unit/test_snapshot.py#L810

We would like to be able to set low and medium priorities on certain requests.

@awertman awertman added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Sep 22, 2022
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner-sqlalchemy API. label Sep 22, 2022
@IlyaFaer
Copy link
Contributor

@asthamohta, this should be possible. We're already using some execution options:

class SpannerExecutionContext(DefaultExecutionContext):

Something similar can be done for priorities.

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/python-spanner-sqlalchemy API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants