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

Document retry of exceptions while streaming 'read'/'execute_sql' results #3790

Merged
merged 1 commit into from
Aug 11, 2017
Merged

Document retry of exceptions while streaming 'read'/'execute_sql' results #3790

merged 1 commit into from
Aug 11, 2017

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Aug 11, 2017

See: #3775.

This PR does not close that issue: it only documents the actual, current retry semantics, instead of the intended-but-not-yet-implemented semantics in the current docs.

@tseaver tseaver added api: spanner Issues related to the Spanner API. docs release blocking Required feature/issue must be fixed prior to next release. labels Aug 11, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 11, 2017
print row
except Exception:
result = snapshot.read(
table, columns, keys, resume_token=result.resume_token)

This comment was marked as spam.

@tseaver
Copy link
Contributor Author

tseaver commented Aug 11, 2017

@vkedia The result in that example is a StreamedResultSet, not the raw protobuf response. We capture the resume_token from the response protobuf into the Python after each successful fetch.

@vkedia
Copy link

vkedia commented Aug 11, 2017

Yes but each successful fetch might not have a resume_token. Also the StreamedResultSet returns the resume_token from the last PRS to the user even though the PRS itself might not have been yielded to the user since it does not form a complete row yet. That will lead to problem 2 I mentioned.

@tseaver tseaver deleted the 3775-spanner-stream-retry-docs-fix branch August 12, 2017 17:27
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 21, 2017
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 22, 2017
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 22, 2017
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 Spanner API. cla: yes This human has signed the Contributor License Agreement. release blocking Required feature/issue must be fixed prior to next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants