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

Stale read support #495

Closed
olavloite opened this issue Nov 7, 2024 · 0 comments · Fixed by #539
Closed

Stale read support #495

olavloite opened this issue Nov 7, 2024 · 0 comments · Fixed by #539
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

@olavloite
Copy link
Contributor

SQLAlchemy + the Spanner dbapi driver supports 'isolation level' AUTOCOMMIT. This enables the use of single-use read-only transactions, but it does not allow the use of

  1. Read-only transactions (see also Read-only transaction support #493)
  2. Specifying a stale read
@olavloite olavloite added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p3 Desirable enhancement or fix. May not be included in next release. labels Nov 7, 2024
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner-sqlalchemy API. label Nov 7, 2024
@olavloite olavloite assigned olavloite and unassigned harshachinta Nov 7, 2024
olavloite added a commit that referenced this issue Dec 5, 2024
Adds a sample and tests for executing stale reads on Spanner. Using
stale reads can improve performance when the application does not require
the guarantees that are given by strong reads.

Fixes #495
olavloite added a commit to googleapis/python-spanner that referenced this issue Dec 5, 2024
Repeatedly setting the staleness property of a connection in a
transaction to the same value caused an error. This made it
harder to use this property in SQLAlchemy.

Updates googleapis/python-spanner-sqlalchemy#495
olavloite added a commit to googleapis/python-spanner that referenced this issue Dec 5, 2024
* fix: allow setting staleness to same value in tx

Repeatedly setting the staleness property of a connection in a
transaction to the same value caused an error. This made it
harder to use this property in SQLAlchemy.

Updates googleapis/python-spanner-sqlalchemy#495

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* Revert "🦉 Updates from OwlBot post-processor"

This reverts commit 282a982.

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
olavloite added a commit that referenced this issue Dec 9, 2024
* docs: add sample for stale reads

Adds a sample and tests for executing stale reads on Spanner. Using
stale reads can improve performance when the application does not require
the guarantees that are given by strong reads.

Fixes #495

* chore: remove GetSession requests
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.

2 participants