You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(spanner): handle errors during stream restart in snapshot (#1471)
***Handle errors during stream restart in snapshot***
**Root Cause**
When `_restart_on_unavailable` caught a `ServiceUnavailable` or
resumable `InternalServerError`, it attempted to re-initialize the
iterator immediately within the `except` block. If this
re-initialization failed (e.g. due to a persistent transient error), the
exception would propagate unhandled, breaking the retry loop.
**Fix**
This change modifies the logic to reset the iterator to `None` and
`continue` the loop, forcing the re-initialization to occur inside the
`try` block. This ensures that subsequent errors during restart are
properly caught and retried.
**Testing**
Added unit tests to cover this specific behavior
0 commit comments