Skip to content

Conversation

@skuruppu
Copy link
Contributor

The snapshot timestamp is the timestamp at which all the reads in a transaction ran when using repeatable read isolation. The method is only intended to be used for internal testing purposes, so the snapshot timestamp will be null if attempted to be used externally.

@skuruppu skuruppu requested review from a team as code owners July 23, 2025 06:25
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: spanner Issues related to the googleapis/java-spanner API. labels Jul 23, 2025
@skuruppu
Copy link
Contributor Author

skuruppu commented Jul 23, 2025

@sakthivelmanii this PR requires #3995 to be merged first.

@skuruppu skuruppu force-pushed the rr_snapshot_timestamp branch 2 times, most recently from ebf0582 to 77539dc Compare July 29, 2025 06:38
* ran at, if the transaction ran at repeatable read isolation in internal test environments, and
* otherwise returns null.
*/
public @Nullable Timestamp getSnapshotTimestamp() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Can we add unit test for this method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good idea. Done.

The snapshot timestamp is the timestamp at which all the reads in a
transaction ran when using repeatable read isolation. The method is
only intended to be used for internal testing purposes, so the snapshot
timestamp will be `null` if attempted to be used externally.
@skuruppu skuruppu force-pushed the rr_snapshot_timestamp branch from 77539dc to 5411e8f Compare July 30, 2025 12:00
@skuruppu
Copy link
Contributor Author

Thanks for the review. PTAL @sakthivelmanii.

@sakthivelmanii sakthivelmanii merged commit 93ca52e into googleapis:main Jul 30, 2025
54 of 56 checks passed
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/java-spanner API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants