Skip to content

feat(Gax): add stall control for resumable uploads - #9638

Closed
bshaffer wants to merge 3 commits into
googleapis:mainfrom
bshaffer:scotty-stall-control
Closed

bshaffer wants to merge 3 commits into
googleapis:mainfrom
bshaffer:scotty-stall-control

Conversation

@bshaffer

@bshaffer bshaffer commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Adds stall control support to Resumable Uploads according to go/cloudsdk-scotty-stall-control.

Changes

  • Adds transferStallMinimumRate (MiB/s) and transferStallTimeout (seconds) options to startUpload().
  • Calculates chunk lag and tracks stall timeout clock across chunk transfers.
  • Computes per-chunk timeouts and per-attempt timeouts (min(chunk_timeout, 2 * chunk_size / rate)).
  • Preserves chunk deadlines across retry and recovery requests.
  • Converts chunk deadline timeouts to an ApiException ("Upload stalled.") when global deadline is not set or not exceeded.
  • Omits the default 10-minute global deadline when stall control is enabled.

Comment thread Gax/src/ResumableUpload/ResumableUpload.php Outdated
@bshaffer bshaffer closed this Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant