Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

feat: snapshot isolation - #1318

Merged
surbhigarg92 merged 14 commits into
mainfrom
snapshot_isolation
Mar 12, 2025
Merged

feat: snapshot isolation#1318
surbhigarg92 merged 14 commits into
mainfrom
snapshot_isolation

Conversation

@surbhigarg92

Copy link
Copy Markdown
Contributor

No description provided.

@product-auto-labelproduct-auto-labelBot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/python-spanner API. labels Mar 4, 2025
@surbhigarg92
surbhigarg92force-pushed the snapshot_isolation branch 2 times, most recently from a300f1e to 44e0104CompareMarch 4, 2025 17:09
@product-auto-labelproduct-auto-labelBot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Mar 6, 2025
@surbhigarg92
surbhigarg92 marked this pull request as ready for review March 6, 2025 05:20
@surbhigarg92
surbhigarg92 requested review from a teamMarch 6, 2025 05:20
Comment threadgoogle/cloud/spanner_v1/client.py Outdated
Comment threadgoogle/cloud/spanner_v1/client.py Outdated
Comment threadgoogle/cloud/spanner_v1/client.py Outdated
Comment threadgoogle/cloud/spanner_v1/database.py Outdated
Comment threadgoogle/cloud/spanner_v1/database.py
Comment threadgoogle/cloud/spanner_v1/session.py Outdated
Comment threadnoxfile.py
@surbhigarg92
surbhigarg92force-pushed the snapshot_isolation branch 4 times, most recently from 7f671bb to f6f44b6CompareMarch 6, 2025 17:17
@harshachintaharshachinta mentioned this pull request Mar 6, 2025
@surbhigarg92

Copy link
Copy Markdown
ContributorAuthor

@olavloite Can you please do one more round of review. Note: Python does not have a similar method like "mergeFrom" in Java. It would need a custom method to merge protos iteratively.
So for Python I have not used proto merge and simply fetching the value directly.

@partheaparthea added the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 10, 2025
@gcf-owl-botgcf-owl-botBot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 10, 2025
@surbhigarg92
surbhigarg92force-pushed the snapshot_isolation branch 4 times, most recently from 497bf85 to 7538b59CompareMarch 11, 2025 09:24

:type default_transaction_options: :class:`~google.cloud.spanner_v1.DefaultTransactionOptions`
or :class:`dict`
:param default_transaction_options: (Optional) Default options to use for all transactions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we clearly call out that this is only for r/w transactions?

Suggested change
:paramdefault_transaction_options: (Optional) Defaultoptionstouseforalltransactions.
:paramdefault_transaction_options: (Optional) Defaultoptionstouseforallread/writetransactions.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I wanted to keep it flexible for all types of transaction options. For example, if we add exclude_txn_from_change_streams to the default transaction options, it should apply to both RW and PDML. To handle this, we can introduce another private property _defaultPDMTransactionOptions within the DefaultTransactionOptions class, where exclude_txn_from_change_streams will be set.

Comment threadgoogle/cloud/spanner_v1/client.py Outdated
Comment threadgoogle/cloud/spanner_v1/database.py Outdated
Comment threadgoogle/cloud/spanner_v1/session.py Outdated
@surbhigarg92
surbhigarg92 enabled auto-merge (squash) March 12, 2025 06:40
@surbhigarg92
surbhigarg92 merged commit 992fcae into mainMar 12, 2025
@surbhigarg92
surbhigarg92 deleted the snapshot_isolation branch March 12, 2025 08:35
@release-pleaserelease-pleaseBot mentioned this pull request Mar 12, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spannerIssues related to the googleapis/python-spanner API.size: lPull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@surbhigarg92@olavloite@sakthivelmanii@parthea