mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-13 03:12:13 +00:00
Fixes #27242 Similar to AWS, google services may at times simply return a 503, more or less meaning "busy, please retry". We rely for most cases higher up layers to handle said retry, but we cannot fully do so, because both we reach this code sometimes through paths that do no such thing, and also because it would be slightly inefficient, since we'd like to for example control the back-off for auth etc. This simply changes the existing retry loop in gcp_host to be a little more forgiving, special case 503 errors and extend the retry to the auth part, as well as re-use the exponential_backoff_retry primitive. v2: * Avoid backoff if refreshing credentials. Should not add latency due to this. * Only allow re-auth once per (non-service-failure-backoff) try. * Add abort source to both request and retry v3: * Include timeout and other server errors in retry-backoff v4: * Reorder error code handling correctly Closes scylladb/scylladb#27267