googleapis / googleapis/google-cloud-python

Missing retry during ExecuteStreamingSql call in _restart_on_unavailable

Ouverte
#15,915 1 commentaire 0 réactions 1 personne assignée Assignée à @harshachinta Voir sur GitHub
api: spanner priority: p3
Langage dominant
Python
Étoiles
5.4k
Forks
1.8k
Merge moyen
3 j 4 h
PR mergées (30 j)
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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.