This is an automated email from the ASF dual-hosted git repository.
Xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new aaad563a60 docs(bindings/nodejs): clarify when `gap` has no effect
(#9338)
aaad563a60 is described below
commit aaad563a60e42c26538b7693f92cd493731fb4ae
Author: Xuanwo <[email protected]>
AuthorDate: Sat Nov 28 15:49:36 2026 +0800
docs(bindings/nodejs): clarify when `gap` has no effect (#9338)
docs(bindings/nodejs): clarify when gap has no effect
Refs #9334
---
bindings/nodejs/generated.d.ts | 24 ++----------------------
bindings/nodejs/src/options.rs | 26 ++------------------------
2 files changed, 4 insertions(+), 46 deletions(-)
diff --git a/bindings/nodejs/generated.d.ts b/bindings/nodejs/generated.d.ts
index 56ef7a73eb..d3877018e9 100644
--- a/bindings/nodejs/generated.d.ts
+++ b/bindings/nodejs/generated.d.ts
@@ -1310,17 +1310,7 @@ export interface ReaderOptions {
* concurrency settings.
*/
prefetch?: number
- /** * Controls the optimization strategy for range reads in
[`Reader::fetch`].
- *
- * When performing range reads, if the gap between two requested ranges is
smaller than
- * the configured `gap` size, OpenDAL will merge these ranges into a single
read request
- * and discard the unrequested data in between. This helps reduce the number
of API calls
- * to remote storage services.
- *
- * This optimization is particularly useful when performing multiple small
range reads
- * that are close to each other, as it reduces the overhead of multiple
network requests
- * at the cost of transferring some additional data.
- */
+ /** Readers returned by `reader()` and `readerSync()` read sequentially, so
`gap` has no effect. */
gap?: bigint
/** * Sets if-match condition for this operation.
* If file exists and its etag doesn't match, an error will be returned.
@@ -1367,17 +1357,7 @@ export interface ReadOptions {
* OpenDAL will use services' preferred chunk size by default. Users can set
chunk based on their own needs.
*/
chunk?: number
- /** * Controls the optimization strategy for range reads in
[`Reader::fetch`].
- *
- * When performing range reads, if the gap between two requested ranges is
smaller than
- * the configured `gap` size, OpenDAL will merge these ranges into a single
read request
- * and discard the unrequested data in between. This helps reduce the number
of API calls
- * to remote storage services.
- *
- * This optimization is particularly useful when performing multiple small
range reads
- * that are close to each other, as it reduces the overhead of multiple
network requests
- * at the cost of transferring some additional data.
- */
+ /** Each call to `read()` or `readSync()` reads a single byte range, so
`gap` has no effect. */
gap?: bigint
/** * Sets the offset (starting position) for range read operations.
* The read will start from this position in the file.
diff --git a/bindings/nodejs/src/options.rs b/bindings/nodejs/src/options.rs
index d0d22006dd..18d8844ba5 100644
--- a/bindings/nodejs/src/options.rs
+++ b/bindings/nodejs/src/options.rs
@@ -175,18 +175,7 @@ pub struct ReadOptions {
*/
pub chunk: Option<u32>,
- /**
- * Controls the optimization strategy for range reads in [`Reader::fetch`].
- *
- * When performing range reads, if the gap between two requested ranges is
smaller than
- * the configured `gap` size, OpenDAL will merge these ranges into a
single read request
- * and discard the unrequested data in between. This helps reduce the
number of API calls
- * to remote storage services.
- *
- * This optimization is particularly useful when performing multiple small
range reads
- * that are close to each other, as it reduces the overhead of multiple
network requests
- * at the cost of transferring some additional data.
- */
+ /// Each call to `read()` or `readSync()` reads a single byte range, so
`gap` has no effect.
pub gap: Option<BigInt>,
/**
@@ -354,18 +343,7 @@ pub struct ReaderOptions {
*/
pub prefetch: Option<u32>,
- /**
- * Controls the optimization strategy for range reads in [`Reader::fetch`].
- *
- * When performing range reads, if the gap between two requested ranges is
smaller than
- * the configured `gap` size, OpenDAL will merge these ranges into a
single read request
- * and discard the unrequested data in between. This helps reduce the
number of API calls
- * to remote storage services.
- *
- * This optimization is particularly useful when performing multiple small
range reads
- * that are close to each other, as it reduces the overhead of multiple
network requests
- * at the cost of transferring some additional data.
- */
+ /// Readers returned by `reader()` and `readerSync()` read sequentially,
so `gap` has no effect.
pub gap: Option<BigInt>,
/**