mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-16 07:36:50 +00:00
## Problem ENT-3267 still lacks typed refresh controls for `supervisor_resources` and `planning_workers` in Python, Rust, and Node, and Node has no `retry_policy` refresh option. Callers must drop to SQL for those controls. ## Change - Add canonical Rust `FunctionRefreshPodResources` and `FunctionRefreshPlanningConfig`, and serialize them through `RefreshColumnOptions`. - Expose both options in the Python sync/async wrappers and PyO3 binding. - Expose both options in the Node NAPI object and add a Node `retryPolicy` object backed by the existing Rust `FunctionRetryPolicy`. - Omitted options stay omitted; branch targeting continues through the table handle. No server, dependency, or pin changes are included. Client-side checks only reject non-positive structural values. Deployment resource limits and column-kind validation remain server-side. ## Validation `cargo fmt --all -- --check`, `python3 -m py_compile`, and `git diff --check` pass. No native build was run locally; CI compiles and tests the change. Generated JS API pages are unchanged.
1.2 KiB
1.2 KiB
@lancedb/lancedb • Docs
@lancedb/lancedb / FunctionRetryPolicy
Interface: FunctionRetryPolicy
Overrides retries of failed user-code calls for one refresh. Omitted fields use the Function refresh defaults.
Properties
errorCodes?
optional errorCodes: string[];
Structured provider error codes or HTTP status codes.
exceptionTypes?
optional exceptionTypes: string[];
Exception class names, preferably qualified.
honorRetryAfter?
optional honorRetryAfter: boolean;
Honor Retry-After within the configured maximum.
initialBackoffSeconds?
optional initialBackoffSeconds: number;
Initial exponential-backoff ceiling, in seconds.
maxAttempts?
optional maxAttempts: number;
Total calls, including the first; 1 disables retries, maximum 100.
maxBackoffSeconds?
optional maxBackoffSeconds: number;
Maximum backoff, in seconds.
messagePattern?
optional messagePattern: string;
Regular expression matched against the exception class and message.
transient?
optional transient: boolean;
Match connection/timeouts, HTTP 429/503, SlowDown and ServiceUnavailable.