#2349 changed the default retryable status codes to `[409, 429, 500, 502, 503, 504]`, but only the Rust docstring was updated. The Python and TypeScript bindings — and the generated TypeScript API reference — still document the old `[429, 500, 502, 503]`. The actual default is set in `ResolvedRetryConfig::try_from` in `rust/lancedb/src/remote/retry.rs`, and `rust/lancedb/src/remote/client.rs` already documents it correctly. This brings the other three in line. Docs only — no behavior change. Split out from #3963 per the "one problem at a time" guidance in `CONTRIBUTING.md`.
2.0 KiB
@lancedb/lancedb • Docs
@lancedb/lancedb / RetryConfig
Interface: RetryConfig
Retry configuration for the remote HTTP client.
Properties
backoffFactor?
optional backoffFactor: number;
The backoff factor to apply between retries. Default is 0.25. Between each retry
the client will wait for the amount of seconds:
{backoff factor} * (2 ** ({number of previous retries})). So for the default
of 0.25, the first retry will wait 0.25 seconds, the second retry will wait 0.5
seconds, the third retry will wait 1 second, etc.
You can also set this via the environment variable
LANCE_CLIENT_RETRY_BACKOFF_FACTOR.
backoffJitter?
optional backoffJitter: number;
The jitter to apply to the backoff factor, in seconds. Default is 0.25.
A random value between 0 and backoff_jitter will be added to the backoff
factor in seconds. So for the default of 0.25 seconds, between 0 and 250
milliseconds will be added to the sleep between each retry.
You can also set this via the environment variable
LANCE_CLIENT_RETRY_BACKOFF_JITTER.
connectRetries?
optional connectRetries: number;
The maximum number of retries for connection errors. Default is 3. You
can also set this via the environment variable LANCE_CLIENT_CONNECT_RETRIES.
readRetries?
optional readRetries: number;
The maximum number of retries for read errors. Default is 3. You can also
set this via the environment variable LANCE_CLIENT_READ_RETRIES.
retries?
optional retries: number;
The maximum number of retries for a request. Default is 3. You can also
set this via the environment variable LANCE_CLIENT_MAX_RETRIES.
statuses?
optional statuses: number[];
The HTTP status codes for which to retry the request. Default is [409, 429, 500, 502, 503, 504].
You can also set this via the environment variable
LANCE_CLIENT_RETRY_STATUSES. Use a comma-separated list of integers.