GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Implement multi-use snapshots by tseaver · Pull Request #3615 · googleapis/google-cloud-python Conversation
Contributor
Multi-use snapshots trigger an "implicit" server-side transaction, and capture its ID on the first request. Subsequent requests return that ID, allowing for isolation from other changes. We default to This feature is one which we originally decided to leave out, but the P0 system test list requires that it be implemented. I think that a commitwise review might be easier than reviewing the whole enchilada.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
dhermes
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No real issues, just cosmetics. Sorry for the delay in review.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
tseaver
force-pushed
the
spanner-multi_use_snapshot
branch
2 times, most recently
from
ad62692 to
d445a73
Compare
dhermes
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
vkedia
reviewed
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
vkedia
reviewed
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
vkedia
reviewed
This comment was marked as spam.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
lukesneeringer
approved these changes
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seeing no actual concerns (either in my own review or the other comments), this is good to go out.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Ah -- confirmed. Thanks @vkedia. (@tseaver His proposed solution seems reasonable to me. Thoughts?) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@tseaver Any updates on this? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I can see adding an explicit In addition, I had thought of having a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
- Convert 'Database.snapshot' and 'Session.snapshot' factories to take / forward '**kw'.
- When reading / executing SQL for a multi-use snapshot, pass the snapshot as the iterator's source.
- PartialResultSet - ResultSetMetadata - ResultSetStats.
- Source will only be set for multi-use snapshots.
799ce25 to
230d715
Compare
There was an error while loading. Please reload this page.
|
To implement the single-use request guard, the snapshot needs to maintain a request counter, which we can use to detect the "interleaved" case. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
That sounds good. We can have an explicit |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Actually why do we need |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
1fff028 to
5dc09f8
Compare
|
@vkedia I've just updated the system tests to pass ________________ TestSessionAPI.test_execute_sql_w_query_param _________________ Traceback (most recent call last): File "/home/tseaver/projects/agendaless/Google/src/google-cloud-python/spanner/tests/system/test_system.py", line 960, in test_execute_sql_w_query_param expected=[(19,), (99,)], File "/home/tseaver/projects/agendaless/Google/src/google-cloud-python/spanner/tests/system/test_system.py", line 888, in _check_sql_results sql, params=params, param_types=param_types)) File "/home/tseaver/projects/agendaless/Google/src/google-cloud-python/spanner/.nox/sys-3-6/lib/python3.6/site-packages/google/cloud/spanner/streamed.py", line 166, in __iter__ self.consume_next() # raises StopIteration File "/home/tseaver/projects/agendaless/Google/src/google-cloud-python/spanner/.nox/sys-3-6/lib/python3.6/site-packages/google/cloud/spanner/streamed.py", line 132, in consume_next response = six.next(self._response_iterator) File "/home/tseaver/projects/agendaless/Google/src/google-cloud-python/spanner/.nox/sys-3-6/lib/python3.6/site-packages/grpc/_channel.py", line 363, in __next__ return self._next() File "/home/tseaver/projects/agendaless/Google/src/google-cloud-python/spanner/.nox/sys-3-6/lib/python3.6/site-packages/grpc/_channel.py", line 357, in _next raise self grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with (StatusCode.INVALID_ARGUMENT, Transaction was started in a different session.)> ______________________ TestSessionAPI.test_read_w_ranges _______________________ Traceback (most recent call last): File "/home/tseaver/projects/agendaless/Google/src/google-cloud-python/spanner/tests/system/test_system.py", line 846, in test_read_w_ranges self.TABLE, self.COLUMNS, keyset)) File "/home/tseaver/projects/agendaless/Google/src/google-cloud-python/spanner/.nox/sys-3-6/lib/python3.6/site-packages/google/cloud/spanner/streamed.py", line 166, in __iter__ self.consume_next() # raises StopIteration File "/home/tseaver/projects/agendaless/Google/src/google-cloud-python/spanner/.nox/sys-3-6/lib/python3.6/site-packages/google/cloud/spanner/streamed.py", line 132, in consume_next response = six.next(self._response_iterator) File "/home/tseaver/projects/agendaless/Google/src/google-cloud-python/spanner/.nox/sys-3-6/lib/python3.6/site-packages/grpc/_channel.py", line 363, in __next__ return self._next() File "/home/tseaver/projects/agendaless/Google/src/google-cloud-python/spanner/.nox/sys-3-6/lib/python3.6/site-packages/grpc/_channel.py", line 357, in _next raise self grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with (StatusCode.INVALID_ARGUMENT, Transaction was started in a different session.)> I tried putting an explicit |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Looks like the back-end passes back an empty transaction ID for read requests after the first one. 0966806 keeps us from clearing it in that case. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thats right. Transaction field is only set if the read or query started a new transaction. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The new system tests are passing. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@tseaver What are you looking for here in terms of review? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@dhermes the commits which are new since @lukesneeringer gave an LGTM on Thursday (the rest are just rebase to fix conflicts). a5219a5 is the hash of that rebased commit, so the diff would be: a5219a5...spanner-multi_use_snapshot |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@tseaver I just saw this. I think that @vkedia will want to review this more when he returns from vacation on Monday. I guess if he finds anything else, it can be addressed in a separate PR. Let's remain Alpha until next week. (FYI @lukesneeringer) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@vkedia Do you plan to finish reviewing this post-merge? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.