Skip to content

docs/rgw/s3vectors: add feature documentation - #70674

Closed
yuvalif wants to merge 36 commits into
ceph:wip-s3vectorfrom
yuvalif:s3vectors-docs-and-fixes
Closed

yuvalif wants to merge 36 commits into
ceph:wip-s3vectorfrom
yuvalif:s3vectors-docs-and-fixes

Conversation

@yuvalif

@yuvalif yuvalif commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
  • add test to cover claims made in the docs
  • make the following code fixes to match the docs:
    • cap the number of metadata keys
    • cap the size of the metadata json document
    • consistent behavior when deleting an index that does not exists
    • disable segmented vector listing
    • cap topk
    • cap the number of non/filterable keys

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

yuvalif and others added 25 commits July 20, 2026 13:16
do some fixes to message validation based on the tesst

Signed-off-by: Yuval Lifshitz <[email protected]>
Signed-off-by: Yuval Lifshitz <[email protected]>
Signed-off-by: Yuval Lifshitz <[email protected]>
not implemented in this commit:
* caching information as VectorBucket attributes and fetching them from
  there: schema, distance type
* VectorBucket policy APIs
* metadata support

Signed-off-by: Yuval Lifshitz <[email protected]>
also fix shaman build failures with lancedb-c. see:
https://shaman.ceph.com/builds/ceph/wip-add-lancedb/e7ce95d8e2e279b373f3c486bd1f64c39b23883f/

note that currently we are testing only against centos
since the rust version in ubuntu jammy and noble is too old for lancedb

liblancedb.so is installed as part of the ceph_base

Signed-off-by: Yuval Lifshitz <[email protected]>
use non-system user. similar to fix here:
8935c1f

Signed-off-by: Yuval Lifshitz <[email protected]>
also. fix token waited issue

Signed-off-by: Yuval Lifshitz <[email protected]>
see: lancedb/lancedb-c#45
also run test on rpm latest (rocky10)

Signed-off-by: Yuval Lifshitz <[email protected]>
* wait for longer than sleep idle time for graceful shutdown
* empty queue on shutdown
* avoud double join on non-graceful shutdown

Signed-off-by: Yuval Lifshitz <[email protected]>
* session is created on vector bucket creation or if any vector level
  operation is performed and no session for the relevent vector bucket
  exists
* session creation is async and best effors. if operation is done when a
  session does not exists, it should not fail the operation, but the
  operation will not benefit for the cahced index and metadata
* session is deleted when vector bucket is deleted, or when another
  operation failed with -ENOENT on the vector bucket (probably deleted
  by another RGW or concurrently by another request on the same RGW)

Signed-off-by: Adarsh <[email protected]>
* we support `nonFilterableMetadataKeys` and reject filter that include
  any of the fields i nthat object
* we support the `filterableMetadataKeys` spec extension
  * these fieldscould be used together with the nearest neighbour search. for
    performence and more accurate results
  * this is done via dynamic creation of the lancedb table schema
  * filterable metadata keys must not start with underscore.
    this should allow future fixed schema columns to be added without name collision
  * `mustExist` flag is used to fail put vector requests that are missing required fields
     in case of filterable columns
* metadata field names with dots are rejected:
  * dots are not allowed in lancedb column names
  * we reject from all metadata fields to allow support
    on nested field filtering in the future. we will use dot
    notations for the path of the field, and this will be ambiguous
    if we allow for dots in field names
* metadata fields support list type.
  ***Note*** filtering on list types is not supported here.
* PutVectors error handling:
  * we verify that json metadata is valid, even for fields that are
    in the dynamic schema
  * reply with fieldList with approproate error message
  * perform schema validation if filterable metadata keys are provided
  * note that we dont error on fields not in the schema, just
    on type mismatch for fields in the schema
  * in case of batch update, do not continue processing in case of error
  * if multiple errors are detected in the same row, stop on the first
* CreateIndex error handling:
  * dont allow for index creation on an existing index even if they are
   the same
  * let lancedb detect any schema violation on filterable columns
  * check there is no overlap between filterable and non filterable
* QueryFilter implementation:
  * filters on filterablekeys and on the metadata json columns
  * filter of both types are not allowed with an OR operator (allowed
    for with AND operator)
  * filtering is not allowed on array typed data
  * filters on keys filterablekeys is done inside lancedb
  * filtering on other keys is done after we get the results from lancedb
    against the json metadata column. in such a case we may return less
    results than asked
  * non-filterable keys are used only to reject filters
  * we have post-filter topk factor conf option. when post filtering is used
    we allow to oversample so that after filtering we may still have k results.
    if after filtering we have more than k results, we truncate the reply to k.
  * added a flag to force post-filtering for mixed  OR queries.
    in case tha the query uses an OR condition between JSON metadata fileds
    and a metadata column we return an error. to still allow that the
    usercan set a flag to treat all fileds as JSON, even if they exist in the table
* json null values are currently rejected:
  * no support in the expr api of lancedb-c
  * for filterable columns that allow nulls, it is not possible
    to distinguish null value from missing field

Signed-off-by: Yuval Lifshitz <[email protected]>
Reviewed-by: Gal Salomon <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* also fix shaman build failures with lancedb-c. see:
https://shaman.ceph.com/builds/ceph/wip-add-lancedb/e7ce95d8e2e279b373f3c486bd1f64c39b23883f/
* add ubuntu support by installing newer cargo version
* use new lancedb_connect_builder_execute API after lancedb-c update
* test s3vectors against a random distro
* supress possibly-lost valgrind issues
* fix some compiler warning in lancedb-c that turn into error in ceph builds
* lancedb-c valgrind tests cover "possibly-lost"
* add an option for building liblancedb as a static library
* removed unused variable
* fix file permissions in one of the test

lancedb-c submodule

Signed-off-by: Yuval Lifshitz <[email protected]>
Add RGW SAL (Storage Abstraction Layer) backend for LanceDB, allowing
vector data to be stored in RADOS via RGW's SAL layer instead of
requiring an external S3 endpoint or local filesystem.

Key changes:
  - New Rust crate (lancedb-rgw-store) implementing the ObjectStore
    trait using C wrapper APIs over RGW SAL operations
    both lancedb-c and the rust crate are staically linked
  - SAL wrapper (rgw_sal_wrapper.h/.cc) providing C FFI for
    underlying object operations
  - Config options: rgw_s3vector_backend (local/s3/rgw),
    rgw_s3vector_local_path, rgw_s3vector_s3_endpoint, rgw_s3vector_s3_region
        - S3 backend uses requesting user's credentials by default
  - Integration test support for all three backends

Signed-off-by: Soumya Koduri <[email protected]>
Assisted-By: Claude Opus 4.6 (1M context) <[email protected]>
* uncomment missing test
* test cconcurrent updates on the same index

Signed-off-by: Yuval Lifshitz <[email protected]>
* also fix build issues with s3 backends (new rust version)
* remove .so file since we use static linking

Signed-off-by: Yuval Lifshitz <[email protected]>
Assisted-By: Claude Opus 5 <[email protected]>
also add coverage from bucket ownership and versioned buckets

Signed-off-by: Yuval Lifshitz <[email protected]>
@yuvalif
yuvalif requested review from a team as code owners July 29, 2026 15:24
@yuvalif

yuvalif commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

/config check ok

@yuvalif
yuvalif force-pushed the s3vectors-docs-and-fixes branch from eb7bbee to a96a734 Compare August 11, 2026 17:47
@yuvalif

yuvalif commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

yuvalif and others added 7 commits August 11, 2026 18:04
* cap the number of metadata keys
* cap the size of the metadata json document
* consistent behavior when deleting an index that does not exists
* disable segmented vector listing
* cap topk
* cap the number of non/filterable keys
* add more test coverage for the expected behavior
* move dead code for places we deviate from the spec
(these fixes were found as part of the documentation process)

Signed-off-by: Yuval Lifshitz <[email protected]>
* add multisite test coverage
* add backend setup into test code, without rgw restart
* run all backends for standalone and multisite
* do proper cleanup with versioned s3 buckets

Signed-off-by: Yuval Lifshitz <[email protected]>
Co-Authored-By: Claude Opus 5.0 <[email protected]>
* change tests to assert if objects remain in s3 bucket
* perform cleanup so that objects and bucket dont remain between runs
* in multisite test wait for user to be on 2ndary site

Signed-off-by: Yuval Lifshitz <[email protected]>
since they are not allowed in the metadata field names
(to avoid confusion with nested objects)

Signed-off-by: Yuval Lifshitz <[email protected]>
…x ops

Signed-off-by: Yuval Lifshitz <[email protected]>
Co-Authored-By: Claude Opus 5.0 <[email protected]>
* make sure we fail if config option was not set
* dont try to create a user on the 2ndary zone

Signed-off-by: Yuval Lifshitz <[email protected]>
Co-Authored-By: Claude Opus 5.0 <[email protected]
@yuvalif
yuvalif force-pushed the s3vectors-docs-and-fixes branch from a96a734 to 01ec1ce Compare August 11, 2026 18:29
Comment thread doc/radosgw/s3vectors.rst Resolved
Comment thread doc/radosgw/s3vectors.rst Resolved
…e keys

* since we do not supprt null values. remove mentions on null value
* remove mentions of the term 'column' since these asre implementation
  details that may change

Signed-off-by: Yuval Lifshitz <[email protected]>
Comment thread doc/radosgw/s3vectors.rst Resolved
Comment thread doc/radosgw/s3vectors.rst Resolved

@bluikko bluikko left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sphinx complains about two syntax issues plus one small nit.

Comment thread doc/radosgw/s3vectors.rst Resolved
Comment thread doc/radosgw/s3vectors.rst Resolved
Comment thread doc/radosgw/s3vectors.rst Resolved
yuvalif and others added 2 commits August 12, 2026 09:34
and also prevent duplicate keys in:
filterableMetadataKeys and nonfilterableMetadataKeys

added test coverage and docs

Signed-off-by: Yuval Lifshitz <[email protected]>
Signed-off-by: Yuval Lifshitz <[email protected]>
Co-Authored-By: Claude Opus 5.0 <[email protected]>
@adamemerson adamemerson self-assigned this Aug 12, 2026
Comment thread qa/tasks/s3vectors_tests.py Resolved
Comment thread doc/radosgw/s3vectors.rst Resolved
Comment thread src/test/rgw/s3vectors/s3vector_test.py Resolved
@soumyakoduri

Copy link
Copy Markdown
Contributor

Overall looks good to me.

Comment thread doc/radosgw/s3vectors.rst
- ``mustExist``: If "true", every vector written to the index must have this
key in its metadata, and a ``PutVectors`` request that omits it fails with
a validation error. (This is "false" by default.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

another restriction, the key-name should not be reserved-words

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

what are the reserved words?

@yuvalif
yuvalif requested a review from a team as a code owner August 14, 2026 06:22
@yuvalif

yuvalif commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

cherry-picked to wip-s3vector

@yuvalif yuvalif closed this Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants