googleapis / googleapis/google-cloud-python

Missing retry during ExecuteStreamingSql call in _restart_on_unavailable

Open
#15,915 1 comment 0 reactions 1 assignee Assigned to @harshachinta View on GitHub
api: spanner priority: p3
Dominant language
Python
Stars
5.4k
Forks
1.8k
Avg merge
3d 4h
Merged PRs (30d)
122

Description

The [_restart_on_unavailable](https://github.com/googleapis/python-spanner/blob/cb74679a05960293dd03eb6b74bff0f68a46395c/google/cloud/spanner_v1/snapshot.py#L51C5-L51C28) method restarts an iteration in case of an `UNAVAILABLE` error. However, the [initial RPC](https://github.com/googleapis/python-spanner/blob/cb74679a05960293dd03eb6b74bff0f68a46395c/google/cloud/spanner_v1/snapshot.py#L88) call for ExecuteStreamingSql/ExecuteStreamingRead to get the iterator may also fail with an `UNAVAILABLE` error, and this retry is not handled. Consequently, errors are surfaced to the customer where the intended behavior is to retry the requests.
One example of this issue is https://github.com/googleapis/python-spanner/issues/1150

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.