You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2026/08/31 07:25:12 UTC
[PR] fix(services/gcs): make conditional uploads retry-safe [opendal]
Xuanwo opened a new pull request, #8199:
URL: https://github.com/apache/opendal/pull/8199
# Which issue does this PR close?
Closes #8198.
# Rationale for this change
GCS generation preconditions require the JSON resumable upload path. If a request fails after GCS persists part or all of its body, the writer must retain the accepted input and reconcile an ambiguous final response before retrying.
Google Cloud documents that an interrupted chunk can be resent in its entirety and that bytes at already persisted offsets are ignored: https://docs.cloud.google.com/storage/docs/performing-resumable-uploads
# What changes are included in this PR?
The conditional writer now flushes previously accepted data before accepting new input, retains a complete chunk until GCS acknowledges its full range, and advances its offset only after that acknowledgement. It queries the resumable session only when the final response is ambiguous, and it builds `Content-Range` through `BytesContentRange`.
Regression tests cover an interrupted intermediate chunk, lost and partially persisted final responses, and an empty upload.
# Are there any user-facing changes?
Yes. Conditional GCS writes now preserve staged input across retries and reconcile ambiguous final responses. There are no public API changes.
# AI Usage Statement
AI materially assisted the implementation and regression tests under maintainer direction. The design relies on the documented GCS resumable-upload retry semantics linked above. No credential-backed GCS test was available; validation used the service unit tests with a mock HTTP transport.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/gcs): make conditional uploads retry-safe [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #8199:
URL: https://github.com/apache/opendal/pull/8199
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org