Skip to content

feat: default create_index to create-only - #4124

Draft
ChilePiquin wants to merge 2 commits into
mainfrom
bruno/default-create-index-create-only
Draft

feat: default create_index to create-only#4124
ChilePiquin wants to merge 2 commits into
mainfrom
bruno/default-create-index-create-only

Conversation

@ChilePiquin

@ChilePiquin ChilePiquin commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

This PR changes create_index to be create-only by default in LanceDB. Before this change, omitting replace could rebuild an existing index, which made duplicate create calls surprising when callers only meant to create a new index. The new default is replace=false; callers that want to rebuild an existing index must pass replace=true explicitly. This is an intentional breaking behavior change for duplicate index creation.

This was accomplished with the following changes:

  • IndexBuilder::new now initializes replace to false, so Rust/local index creation defaults to create-only.
  • Remote index submission in RemoteTable::submit_create_index always serializes replace, preserving both the new default and explicit replace=true.
  • Python sync, async, and remote wrappers now default replace to False and pass that value through consistently.
  • Node API docs and duplicate-index tests now reflect create-only default behavior.
  • Remote-only async job helpers in rust/lancedb/src/job.rs are gated behind the remote feature so default-feature builds compile cleanly.

Testing

  • Updated Rust tests for default async duplicate-index failures and remote request serialization.
  • Updated Python index and wrapper tests for default create-only behavior and explicit replacement.
  • Updated Node duplicate-index test expectations.

@github-actions github-actions Bot added enhancement New feature or request Python Python SDK Rust Rust related issues labels Sep 3, 2026
@lancedb-gatekeeper
lancedb-gatekeeper Bot removed the request for review from lancedb-robot September 3, 2026 21:26
@lancedb-gatekeeper
lancedb-gatekeeper Bot removed the request for review from lancedb-robot September 3, 2026 21:27
@lancedb-gatekeeper
lancedb-gatekeeper Bot removed the request for review from lancedb-robot September 3, 2026 21:28
lancedb-gatekeeper[bot]

This comment was marked as outdated.

@lancedb-gatekeeper lancedb-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Sep 3, 2026
@ChilePiquin ChilePiquin added the breaking-change A breaking change in our public APIs label Sep 3, 2026
@lancedb-gatekeeper lancedb-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Sep 3, 2026
@lancedb-gatekeeper
lancedb-gatekeeper Bot removed the request for review from lancedb-robot September 3, 2026 23:11

@lancedb-gatekeeper lancedb-gatekeeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gate recommendation: approve.

2 fixed / 0 remain. The revision now sets create-only behavior at the shared builder boundary, keeps local, remote, Python, and TypeScript contracts aligned, and preserves explicit replacement through the existing remote contract established in #4115. Keeping duplicate rejection at the backend operation avoids a racy client-side existence check.

The repaired request fixtures and generated API reference match the new behavior; no further changes are requested.

@lancedb-gatekeeper lancedb-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change A breaking change in our public APIs enhancement New feature or request K-approved Latest Gatekeeper recommendation permits acceptance. Python Python SDK Rust Rust related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant