Skip to content

let table creation API return an error code - #68

Merged
yuvalif merged 1 commit into
lancedb:mainfrom
yuvalif:add-return-code-to-table-open
Aug 26, 2026
Merged

yuvalif merged 1 commit into
lancedb:mainfrom
yuvalif:add-return-code-to-table-open

Conversation

@yuvalif

@yuvalif yuvalif commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

note: this is an API breaking change

Copilot AI 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.

Pull request overview

Updates the table-opening C API to return structured error codes and optional detailed messages.

Changes:

  • Changes lancedb_connection_open_table to use output parameters.
  • Adds failure-path tests and reusable table-opening helpers.
  • Updates examples and existing tests for the breaking API.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/connection.rs Implements error-returning table opening.
include/lancedb.h Updates the public C API declaration.
examples/full.cpp Migrates example usage.
tests/test_common.h Declares new test helpers.
tests/test_common.cpp Implements table-opening helpers.
tests/test_connection.cpp Adds opening error-path coverage.
tests/test_table.cpp Migrates table tests.
tests/test_index.cpp Migrates scalar-index tests.
tests/test_vector_index.cpp Migrates vector-index tests.
tests/test_table_meta.cpp Migrates table metadata tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/connection.rs Resolved
Comment thread include/lancedb.h Resolved
note: this is an API breaking change

also extract error from error messages and return to caller:
this is a stopgap fix until a lancedb fix report the error codes
back correcttly for namespaces

Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@yuvalif
yuvalif force-pushed the add-return-code-to-table-open branch from 2bb9e4f to e9d66e3 Compare August 26, 2026 09:30
@yuvalif yuvalif changed the title let teable creation API return an error code let table creation API return an error code Aug 26, 2026
@yuvalif
yuvalif merged commit a4ac1c0 into lancedb:main Aug 26, 2026
7 checks passed
yuvalif added a commit to yuvalif/ceph that referenced this pull request Aug 27, 2026
- using lancedb/lancedb-c#68 to allow for -ENOENT to be returned from table opening
- `CreateVectorBucket`: verify the backend before creating the bucket metadata,
  so a failed request leaves nothing behind. Non-ENOENT load errors now fail the request
- `DeleteVectorBucket`: -ENOENT from the backend is not an error — the metadata is deleted and the operation succeeds.
   so a bucket whose backend is gone can't get stuck.
- `ListIndexes`: -ENOENT from the backend returns an empty list. so, listing before deletion
  would work even in case that DeleteVectorBucket was called and failed o nthe metadata
- `DeleteIndex`: no -ENOENT tolerance, so a missing index returns 404 - to be spec complient

Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
yuvalif added a commit to yuvalif/ceph that referenced this pull request Sep 9, 2026
- using lancedb/lancedb-c#68 to allow for -ENOENT to be returned from table opening
- `CreateVectorBucket`: verify the backend before creating the bucket metadata,
  so a failed request leaves nothing behind. Non-ENOENT load errors now fail the request
- `DeleteVectorBucket`: -ENOENT from the backend is not an error — the metadata is deleted and the operation succeeds.
   so a bucket whose backend is gone can't get stuck.
- `ListIndexes`: -ENOENT from the backend returns an empty list. so, listing before deletion
  would work even in case that DeleteVectorBucket was called and failed o nthe metadata
- `DeleteIndex`: no -ENOENT tolerance, so a missing index returns 404 - to be spec complient

Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
Assisted-by: claude-code:claude-opus-5
yuvalif added a commit to ceph/ceph that referenced this pull request Sep 9, 2026
- using lancedb/lancedb-c#68 to allow for -ENOENT to be returned from table opening
- `CreateVectorBucket`: verify the backend before creating the bucket metadata,
  so a failed request leaves nothing behind. Non-ENOENT load errors now fail the request
- `DeleteVectorBucket`: -ENOENT from the backend is not an error — the metadata is deleted and the operation succeeds.
   so a bucket whose backend is gone can't get stuck.
- `ListIndexes`: -ENOENT from the backend returns an empty list. so, listing before deletion
  would work even in case that DeleteVectorBucket was called and failed o nthe metadata
- `DeleteIndex`: no -ENOENT tolerance, so a missing index returns 404 - to be spec complient

Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
Assisted-by: claude-code:claude-opus-5
yuvalif added a commit to ceph/ceph-ci that referenced this pull request Sep 9, 2026
- using lancedb/lancedb-c#68 to allow for -ENOENT to be returned from table opening
- `CreateVectorBucket`: verify the backend before creating the bucket metadata,
  so a failed request leaves nothing behind. Non-ENOENT load errors now fail the request
- `DeleteVectorBucket`: -ENOENT from the backend is not an error — the metadata is deleted and the operation succeeds.
   so a bucket whose backend is gone can't get stuck.
- `ListIndexes`: -ENOENT from the backend returns an empty list. so, listing before deletion
  would work even in case that DeleteVectorBucket was called and failed o nthe metadata
- `DeleteIndex`: no -ENOENT tolerance, so a missing index returns 404 - to be spec complient

Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
Assisted-by: claude-code:claude-opus-5
kginonredhat pushed a commit to kginonredhat/ceph that referenced this pull request Sep 30, 2026
- using lancedb/lancedb-c#68 to allow for -ENOENT to be returned from table opening
- `CreateVectorBucket`: verify the backend before creating the bucket metadata,
  so a failed request leaves nothing behind. Non-ENOENT load errors now fail the request
- `DeleteVectorBucket`: -ENOENT from the backend is not an error — the metadata is deleted and the operation succeeds.
   so a bucket whose backend is gone can't get stuck.
- `ListIndexes`: -ENOENT from the backend returns an empty list. so, listing before deletion
  would work even in case that DeleteVectorBucket was called and failed o nthe metadata
- `DeleteIndex`: no -ENOENT tolerance, so a missing index returns 404 - to be spec complient

Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
Assisted-by: claude-code:claude-opus-5
dparmar18 pushed a commit to dparmar18/ceph that referenced this pull request Oct 5, 2026
- using lancedb/lancedb-c#68 to allow for -ENOENT to be returned from table opening
- `CreateVectorBucket`: verify the backend before creating the bucket metadata,
  so a failed request leaves nothing behind. Non-ENOENT load errors now fail the request
- `DeleteVectorBucket`: -ENOENT from the backend is not an error — the metadata is deleted and the operation succeeds.
   so a bucket whose backend is gone can't get stuck.
- `ListIndexes`: -ENOENT from the backend returns an empty list. so, listing before deletion
  would work even in case that DeleteVectorBucket was called and failed o nthe metadata
- `DeleteIndex`: no -ENOENT tolerance, so a missing index returns 404 - to be spec complient

Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
Assisted-by: claude-code:claude-opus-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants