Xuanwo opened a new pull request, #9384: URL: https://github.com/apache/opendal/pull/9384
# Which issue does this PR close? None. The report is below. # Rationale for this change The reader docs describe `prefetch` as a cap on completed chunks waiting in memory. That wording suggests that with `prefetch = 0`, a concurrent reader cannot have a completed chunk waiting for the consumer. The original backpressure report was #6440, and #9381 carried the shared wording into the generated Node.js options. To reproduce, write `0123456789` to the Memory service. Use an executor that runs each submitted task to completion immediately and increments a counter when the task finishes. Open a reader with `concurrent = 2` and `chunk = 1`, call `reader.into_stream(0..10)`, and request the first buffer. With a fresh counter for each run, two tasks had completed when `try_next()` returned the first byte with `prefetch = 0`, and three had completed with `prefetch = 1`. Both counts include the task that produced the delivered byte. The exact counts depend on scheduling and when the consumer polls the stream. Rerunning the probe on `247061ee9b` reproduced both counts, and TypeDoc, Javadoc, and Doxygen showed the corrected wording from the regenerated Node.js, Java, and C sources. # What changes are included in this PR? Correct the shared `ReaderOptions::prefetch` docs and the public Node.js, Java, C, and Go docs, including the generated declarations and the Java guide. The Java generator now reuses the shared explanation and appends Java's chunking and negative-value rules. # Are there any user-facing changes? Documentation only. 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 of `0` disables those extra slots. Reads already submitted under `concurrent` can still finish and wait for collection. Serial reads collect each result before starting the next read. Higher `prefetch` values can increase memory use. # Breaking changes # AI Usage Statement - Pi, `magpie/codex/gpt-6.2-sol`, `max` effort, implemented the documentation changes. - Pi, `magpie/codex/gpt-6.2-astra`, `high` effort, investigated reader scheduling and drafted the PR description. - Pi, `magpie/codex/gpt-6.2-astra`, `xhigh` effort, coordinated the work and verified the changes. -- 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]
