mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-27 04:53:59 +00:00
feat: expose structured Function refresh options in SDKs (#5047)
## 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.
This commit is contained in:
@@ -1225,12 +1225,18 @@ LanceDB Enterprise it is the server's backfill job.
|
||||
`REFRESH COLUMN ... WHERE ... WITH (...)` form: `where` narrows the rows,
|
||||
`errorPolicy`, `maxFailedFraction`, `maxFailedRows`, `rowTimeoutSeconds`
|
||||
and `initTimeoutSeconds` govern failing rows. `batchSize`, `gpuClass`,
|
||||
`maxConcurrency`, `resourceBudget` and
|
||||
`maxExecutorProcessesPerWorker` size registered Function refreshes.
|
||||
`maxConcurrency`, `resourceBudget`, `supervisorResources`,
|
||||
`planningWorkers` and `maxExecutorProcessesPerWorker` size registered
|
||||
Function refreshes. `retryPolicy` overrides user-code retries only when
|
||||
repeating partial work is safe; set `maxAttempts: 1` to disable retries.
|
||||
`maxConcurrency` overrides the registered default for this logical
|
||||
execution only and is a positive integer; it is not an account-wide
|
||||
quota. A `resourceBudget` requires `cpuMillis` and
|
||||
`memoryBytes`; its `gpuCount` defaults to zero for a CPU-only Function.
|
||||
`supervisorResources` and each `planningWorkers.resources` entry require
|
||||
positive `cpuMillis`, `memoryBytes` and `ephemeralStorageBytes`.
|
||||
`planningWorkers` also requires positive `maxWorkers`,
|
||||
`rowsPerWorker` and `fragmentsPerWorker`.
|
||||
The budget applies only to this explicit refresh and does not configure
|
||||
a later automatic refresh.
|
||||
`gpuCount` at the top level is the shorthand that preserves the
|
||||
|
||||
Reference in New Issue
Block a user