Xuanwo opened a new pull request, #9309:
URL: https://github.com/apache/opendal/pull/9309

   # Which issue does this PR close?
   
   Relates to #2611.
   
   # Rationale for this change
   
   A caller that reads a binary file in several ranges needs a way to keep 
reading the same revision if another writer overwrites the file between 
requests.
   
   # What changes are included in this PR?
   
   GDrive now advertises `read_with_version`. When a caller selects a revision, 
the reader sends that revision ID to Drive on every range request, including 
retries after a path refresh.
   
   Live tests on My Drive read distinct bytes from the historical and current 
revisions of the same file after an overwrite. A read using another file’s 
revision ID returned `NotFound`, and both download attempts used the requested 
ID.
   
   # Are there any user-facing changes?
   
   For binary files, `stat(path)` now exposes Drive’s `headRevisionId` through 
`Metadata::version()` when available. Pass that ID to 
`read_with(path).version(id)` or `reader_with(path).version(id)` to read that 
revision. Drive can purge older revisions and may require Keep Forever before 
allowing a download.
   
   Fresh streaming readers returned the expected suffix for both revisions. A 
fresh chunked reader needs the selected revision’s size to plan a suffix read 
and returns `Unsupported` when that size is unknown.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - Pi ran `magpie/codex/gpt-6.2-sol` at `max` effort to implement the change 
and run the live Google Drive probes.
   - Pi ran `magpie/codex/gpt-6.2-astra` at `high` effort to reason about the 
read contract and draft the PR description.
   - Pi ran `magpie/devin/swe-2-1` with the provider’s default reasoning 
setting to independently review the candidate and its live test evidence.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to