mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 20:44:00 +00:00
feat: expose per-call merge retry controls in Python and Node (#5015)
Python and Node callers could not disable precommit retries for one
merge without changing the connection. Add `execute(..., retries=0)` for
Python sync/async and `execute(data, { retries: 0 })` for TypeScript,
forwarding into the existing Rust control without persisting the
override. Ambiguous 5xx outcomes remain non-replayable; permitted merge
retries now log status and attempt at WARN, and the API docs explain
retry budgets and timeout boundaries.
Validation at `6001300` passed 70 Python HTTP cases, 36 Node HTTP cases,
14 local merge regressions per binding, and 34 scoped Rust tests, with
rebuilt native extensions, TypeScript compilation, Clippy, scoped
formatting/lint, and generated API docs. The public API and feature diff
are unchanged after integrating main and the reviewed ingestion guide;
that binding evidence is retained. Focused merged-tree validation
additionally passed 267 Rust merge/retry/provenance cases and the CI
fixtures. Existing root Ruff issues in docs/web-tests remain; local
fixtures do not establish live proxy/server cancellation behavior.
Refs #4256 and OSS-2370.
This commit is contained in:
@@ -8,6 +8,26 @@
|
||||
|
||||
## Properties
|
||||
|
||||
### retries?
|
||||
|
||||
```ts
|
||||
optional retries: number;
|
||||
```
|
||||
|
||||
Override the remote retry budget for this execution only (an integer from
|
||||
0 to 255). Use `execute(data, { retries: 0 })` to disable even retries after
|
||||
precommit conflicts (409) or rate limits (429). This does not change
|
||||
connection-wide/read budgets or local transaction conflict retries.
|
||||
|
||||
By default, remote calls use the connection's `clientConfig.retryConfig`
|
||||
([RetryConfig](RetryConfig.md)). Its `statuses` (also set through
|
||||
`LANCE_CLIENT_RETRY_STATUSES`) selects candidates within the retry budget;
|
||||
it never permits replay of ambiguous merge outcomes. In particular, 502,
|
||||
ordinary 503, and 504 are never replayed, even if configured. Reconcile table
|
||||
contents before manually repeating a merge whose commit outcome is unknown.
|
||||
|
||||
***
|
||||
|
||||
### timeoutMs?
|
||||
|
||||
```ts
|
||||
@@ -24,3 +44,6 @@ the second attempt will be cancelled after 10 seconds, hitting the
|
||||
first attempt will not be cancelled.
|
||||
|
||||
When this is set, the timeout is enforced on all attempts, including the first.
|
||||
For remote tables this is sent as a server execution timeout. It does not
|
||||
extend HTTP read or proxy idle timeouts, or prove that a failed request did
|
||||
not commit.
|
||||
|
||||
Reference in New Issue
Block a user