Skip to content

rgw/s3vectors: allow vector buckets to hold objects - #70228

Closed
yuvalif wants to merge 20 commits into
ceph:wip-s3vectorfrom
yuvalif:wip-store-in-vector-bucket
Closed

yuvalif wants to merge 20 commits into
ceph:wip-s3vectorfrom
yuvalif:wip-store-in-vector-bucket

Conversation

@yuvalif

@yuvalif yuvalif commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

yuvalif and others added 20 commits July 1, 2026 15:02
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]>
* this change is needed in order to avoid the hack used
  in the ditributed lock implementation of the background indexing
  proecess. see:
  ceph#68736 (review)
* this change is needed for the SAL backend, so it does not need an S3
  bucket to be created explicitly for lancedb. see:
  ceph#69828
* it also simplifies the implementation and remove code duplication from
  SAL

Signed-off-by: Yuval Lifshitz <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

1 similar comment
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@yuvalif
yuvalif force-pushed the wip-s3vector branch 3 times, most recently from d6feb28 to 96018c5 Compare July 20, 2026 15:17
@yuvalif

yuvalif commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

we would have the "rgw" backend in 2 modes:

  • using an S3 bucket as the backend (current state)
  • using the vector bucket as the backend (this pr)

usign the vector bucket as the backend should eb the default behavior, since it requires no additional setup (create an s3 bucket with proper policies). however, we want to keep this option as well, so that the objects in lance format could be viewed by other applications or clients

an additiona step would be to have the backend configuration (local, s3, rgw in its 2 modes) set as a vector bucket attribute (upon creation). so, different vector buckets could use different backends

@yuvalif
yuvalif force-pushed the wip-s3vector branch 3 times, most recently from 3511072 to 7480fdb Compare August 16, 2026 10:33
@yuvalif
yuvalif force-pushed the wip-s3vector branch 2 times, most recently from ea5d4ff to 2359632 Compare September 17, 2026 05:07
@yuvalif
yuvalif deleted the branch ceph:wip-s3vector September 17, 2026 17:16
@yuvalif yuvalif closed this Sep 17, 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.

2 participants