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

   # Which issue does this PR close?
   
   None. The report is below.
   
   # Rationale for this change
   
   The Rust `ReaderOptions` summary says that “a missing file or a failed 
condition surfaces when reading from it.” A chunked `read(..)` can return an 
empty buffer before reaching storage. Review of #9385 brought this separate 
Rust documentation issue to light.
   
   On upstream commit `222a828449`, the reproduction used both 
`Operator::reader_options` and `Operator::reader_with` with a four-byte chunk 
and `content_length_hint` set to `0`. Both constructors succeeded in each case 
below. Each reader was then used for two consecutive reads. The explicit range 
in the second read reached storage.
   
   | Service and path | First call, `read(..)` | Second call on the same 
reader, `read(0..1)` |
   | --- | --- | --- |
   | Memory, missing file | Empty buffer | `NotFound` |
   | Fs, missing file | Empty buffer | `NotFound` |
   | Fs, existing empty file with `if_modified_since` set to 2099-01-01, after 
its modification time | Empty buffer | `ConditionNotMatch` |
   
   With the same chunk size and no length hint, `reader_with` still succeeded 
for the missing file on both services, and `read(..)` returned `NotFound`. Both 
services also rejected an unsupported `if_match` at construction with 
`Unsupported`.
   
   # What changes are included in this PR?
   
   Remove the clause that implies every read surfaces a missing file or failed 
condition. The preceding text already describes the errors for a read that 
reaches storage. The construction sentence now ends with its accurate statement 
that creating a reader checks options and capabilities without accessing 
storage.
   
   The Node.js and C++ generators and their tests match the shorter Rust 
sentence, and normal regeneration reproduces both bindings’ comments byte for 
byte while Rustdoc renders the corrected summary.
   
   # Are there any user-facing changes?
   
   Rust callers can now distinguish the checks performed when they create a 
reader from the errors they can observe when a read reaches storage. This is a 
documentation correction.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - Pi, `magpie/codex/gpt-6.2-astra`, high effort, investigated the Rust 
reader behavior and wrote the PR description.
   - Pi, `magpie/codex/gpt-6.2-astra`, xhigh effort, coordinated the 
investigation and verified the reproduction.
   - Pi, `magpie/codex/gpt-6.2-sol`, max effort, implemented the documentation 
correction.
   


-- 
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