chitralverma commented on PR #9382:
URL: https://github.com/apache/opendal/pull/9382#issuecomment-7258985671

   (AI-generated reply)
   
   Thanks, fixed in f1513b4a1. It is a fixup that regenerates the C++ header 
from the core text that #9384 corrected. The head, f3080a862, merges `main` at 
e81760b7a, and that merge needs no regeneration. The wrong text was core's, 
which the C++ header rendered unchanged; no C++ rewrite was involved.
   
   The `ReaderOptions::prefetch` doc in `include/options.hpp` now reads:
   
   > Controls read-ahead during concurrent range reads.
   >
   > Up to `prefetch` finished reads can each free a slot for another range 
read before OpenDAL collects their results.
   >
   > The default, `0`, disables these extra slots. Reads already submitted 
under `concurrent` can still finish and wait to be collected.
   >
   > Serial reads collect each result before starting the next read. Higher 
values can increase memory use.
   
   I checked it through this binding, on a build of f1513b4a1, against Silo S3 
behind a proxy that delays the response for the first byte by one second. Each 
run reads 10 bytes with `chunk = 1` and `content_length_hint = 10`:
   
   - With `concurrent = 2` and `prefetch = 0`, two `GetObject`s start before 
that response, and the second one finishes and waits for it. With `concurrent = 
3`, three start, and two finish and wait. So completed chunks wait at `prefetch 
= 0`, as the new text says and the old text denied.
   - `prefetch` values of 1, 2, and 4 give the same counts. 
`ChunkedReader::read` submits more reads only when it is about to collect the 
next chunk. Only at that point does `ConcurrentTasks::has_remaining` 
(`tasks.len() < concurrent + completed.min(prefetch)`) let finished reads free 
their slots. A C++ `Read` that waits on one slow chunk therefore starts no 
extra request.
   - With `concurrent = 1`, one `GetObject` runs at a time, for `prefetch` 0 
and 3.
   
   Checks:
   
   - On f3080a862, every `ci_odev.yml` generator plus each binding's `cargo 
fmt` leaves `git diff --exit-code` clean.
   - On f3080a862, `dev` `cargo test` passes (154 tests), and `bindings/cpp` 
`cargo clippy -D warnings` and `cargo test` pass.
   - On f1513b4a1, the `OPENDAL_DEV=ON` build passes 129 of 129 tests.
   
   The PR description now covers the `prefetch` 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