Skip to content

rgw/s3-vector: Add RGW/SAL backend support for S3vectors - #69828

Closed
soumyakoduri wants to merge 20 commits into
ceph:wip-s3vectorfrom
soumyakoduri:wip-skoduri-s3vector-sal
Closed

soumyakoduri wants to merge 20 commits into
ceph:wip-s3vectorfrom
soumyakoduri:wip-skoduri-s3vector-sal

Conversation

@soumyakoduri

@soumyakoduri soumyakoduri commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds support for RGW/SAL backend for S3Vector LanceDB operations

TODO:

  1. compile time version check for RGW SAL wrapper and lancedb-rgw-store rust crate
  2. Use vector bucket directly as store instead of requiring separate S3 bucket
  3. Include more unit-tests (probably in-memory mock store for rust crate?)
  4. Explore callback-based streaming reads for Rust FFI instead of ranged reads.
  5. explore if and how yield_context can be passed from boost:asio to rust tokio threads and back to same asio thread in sal_wrapper.
  6. Zero cache for LanceDB short-lived sessions

Signed-off-by: Soumya Koduri [email protected]
Assisted-By: Claude Opus 4.6 (1M context) [email protected]

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.

@github-actions

github-actions Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

Config Diff Tool Output

+ added: rgw_s3vector_topk_post_filter_factor (rgw.yaml.in)
+ added: rgw_s3vector_s3_endpoint (rgw.yaml.in)
+ added: rgw_s3vector_backend (rgw.yaml.in)
+ added: rgw_s3vector_s3_region (rgw.yaml.in)
+ added: rgw_s3vector_s3_allow_http (rgw.yaml.in)
+ added: rgw_s3vector_local_path (rgw.yaml.in)
! changed: rgw_enable_apis: old: s3, s3control, s3website, swift, swift_auth, admin, sts, iam, notifications (rgw.yaml.in)
! changed: rgw_enable_apis: new: s3, s3control, s3website, swift, swift_auth, admin, sts, iam, notifications, s3vectors (rgw.yaml.in)

The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
Ignore this comment if docs are already updated. To make the "Check ceph config changes" CI check pass, please comment /config check ok and re-run the test.

@soumyakoduri
soumyakoduri requested review from yuvalif and removed request for a team June 30, 2026 09:25
yuvalif and others added 19 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]>
@soumyakoduri
soumyakoduri force-pushed the wip-skoduri-s3vector-sal branch from dbb9280 to fa79d5c Compare July 21, 2026 04:24
Comment thread src/rgw/rgw_s3vector.h Resolved
Comment thread src/rgw/rgw_s3vector.cc Resolved
Comment thread src/rgw/rgw_s3vector.cc Resolved
Comment thread src/rgw/rgw_s3vector.cc Resolved
Comment thread src/rgw/rgw_s3vector.cc Resolved
Comment thread src/rgw/rgw_s3vector.cc Resolved
@soumyakoduri
soumyakoduri force-pushed the wip-skoduri-s3vector-sal branch from fa79d5c to 4203536 Compare July 21, 2026 10:38
Comment thread src/rgw/lancedb-rgw-store/src/ffi.rs Resolved
Comment thread src/rgw/rgw_sal_wrapper.h Resolved
@soumyakoduri
soumyakoduri force-pushed the wip-skoduri-s3vector-sal branch from 4203536 to 91a1df3 Compare July 21, 2026 18:21
Comment thread src/rgw/rgw_s3vector_background.cc Resolved
Comment thread src/rgw/rgw_s3vector.cc Resolved
Comment thread src/rgw/rgw_s3vector.cc Resolved
@yuvalif

yuvalif commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This PR adds support for SAL backend for S3Vector LanceDB operations

TODO:

  1. compile time version check for RGW SAL wrapper and lancedb-rgw-store rust crate
  2. Use vector bucket directly as store instead of requiring separate S3 bucket

this is implemented here: #70228

  1. Include more unit-tests (probably in-memory mock store for rust crate?)

instead of mock, i would recommend adding unit tests similar to how we test cls code.
test are covering the crate without mocking the backend, instead we use the actual sal code and a real rados vstart cluster (with no RGW)

  1. Explore callback-based streaming reads for Rust FFI instead of ranged reads.
  2. explore if and how yield_context can be passed from boost:asio to rust tokio threads and back to same asio thread in sal_wrapper.
  3. Zero cache for LanceDB short-lived sessions

@soumyakoduri
soumyakoduri force-pushed the wip-skoduri-s3vector-sal branch from 91a1df3 to bd9fcca Compare July 22, 2026 17:04
Comment thread src/common/options/rgw.yaml.in Resolved
Comment thread src/test/rgw/s3vectors/README.rst Resolved
Comment thread src/test/rgw/s3vectors/README.rst Resolved
Comment thread src/test/rgw/s3vectors/README.rst Resolved
Comment thread src/test/rgw/s3vectors/s3vector_test.py Resolved
Comment thread src/rgw/rgw_s3vector_background.cc Resolved
@soumyakoduri
soumyakoduri force-pushed the wip-skoduri-s3vector-sal branch from 27ad141 to b132c1c Compare July 24, 2026 05:37
@soumyakoduri soumyakoduri changed the title rgw/s3-vector: Add SAL backend support for S3vectors rgw/s3-vector: Add RGW/SAL backend support for S3vectors Jul 24, 2026
@yuvalif
yuvalif self-requested a review July 27, 2026 10:00
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]>
@yuvalif
yuvalif force-pushed the wip-skoduri-s3vector-sal branch from b132c1c to 9c29318 Compare July 27, 2026 10:57
@yuvalif

yuvalif commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

closing after befbcf6 was cherry-picked to wip-s3vector

@yuvalif yuvalif closed this Jul 27, 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.

3 participants