Skip to content

storage: cap consecutive routing redirects in bidi read #7200

Open

Description

@xlai20

Problem Description

In google-cloud-storage, the bidi write enforces a maximum limit on consecutive routing redirects (MAX_REDIRECTS_FOLLOWED = 3 in bidi_write::retry_redirect), aligning with other language SDKs.

However, in the bidi read (bidi::RetryRedirect and bidi::ResumeRedirect), redirect errors (Code::Aborted with BidiReadObjectRedirectedError) are converted to RetryResult::Continue, but there is currently no dedicated cap on consecutive redirects followed. Because redirect errors are classified separately from standard transient errors, attempt-limited retry policies do not deterministically bound consecutive redirect chains before the overall request timeout.

Expected Behavior

Consecutive redirects in bidi read should be bounded by a fixed limit (e.g. 3 consecutive redirects / 4 total attempts, matching bidi_write and other SDKs), returning an error if the limit is exceeded.

Activity

  1. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Oct 15, 2026
  2. self-assigned this
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions