Repository navigation
feat(datastore): adds snapshot reads - #6755
Merged
Merged
Conversation
enocom
reviewed
Oct 3, 2022
enocom
suggested changes
Oct 12, 2022
| } | ||
|
|
||
| ctx := context.Background() | ||
| client.WithReadOptions(ReadTime(time.Now())) |
Contributor
There was a problem hiding this comment.
How are we checking that the read time is actually sent to the backend? Maybe I'm missing something, but I don't see how this test exercises that logic.
Contributor
Author
There was a problem hiding this comment.
This is just a unit test. Any check where we read the response's read time would be merely a result of how we set up the mock (and hence not useful as a test case).
Contributor
Author
There was a problem hiding this comment.
This test is really just to ensure that using Client.WithReadOptions() doesn't result in an error.
enocom
suggested changes
Oct 17, 2022
enocom
approved these changes
Oct 25, 2022
telpirion
enabled auto-merge (squash)
October 26, 2022 18:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds snapshot reads to the client and transactions. Snapshot reads allow for a time-specific read-only version of the database to be accessed.
Note: This PR does not include integration tests, as read results do not indicate a read time.