Skip to content

rgw/s3vector: adding s3vectors API support to the RGW - #66066

Merged
yuvalif merged 58 commits into
mainfrom
wip-s3vector
Sep 17, 2026
Merged

yuvalif merged 58 commits into
mainfrom
wip-s3vector

Conversation

@yuvalif

@yuvalif yuvalif commented Oct 27, 2025 •

Copy link
Copy Markdown
Contributor

according to:
https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations_Amazon_S3_Vectors.html

Important Note

This is a feature branch for collaborative work on adding s3vectors API support to the RGW.
PRs should be opened against this branch ("wip-s3vector") and not "main".

Tasks

Frontend

  • implement info put/get for data not stored inside lancedb (or that needs to be both in lancedb and ceph)
    • implement encode/decode functions for relevant data structures
    • extend SAL with APIs needed for the new data structures
    • implement them in case of SAL RADOS
    • implement the Get/List operations for these data structures
    • CreateVectorBucket
    • GetVectorBucket
    • ListVectorBuckets
    • DeleteVectorBucket
  • implement authorization at vector bucket level
    • PutVectorBucketPolicy
    • GetVectorBucketPolicy
  • add https://github.com/yuvalif/lancedb-c as a git submodule and add to the build system
  • use existing functions from lancedb-c to implement the operations
    • use blocking calls
    • use local filesystem
  • list missing APIs from lancedb-c
  • add test suite (it requires a new version of boto)
  • add encryptionConfiguration support to vector bucket creation
  • metadata filter support
  • documentation

Background

  • create vector index once there are enough vectors in the table
  • create bitmap index once there are enough with metadata vectors in the table
  • pefform index optimizations periodicaly based on time or other metrics doc
  • decide on read consistency interval (balance read speed with accuracy) doc
  • implement local session cache for db connections
  • implement distributed session cache for db connections doc

LanceDB

  • allow async-IO calls to lancedb-c using boost::asio::yield_context
  • allow async-IO calls to lancedb-c using boost::asio::yield_context that can trickle to a C++ backend that supports this kind of async-IO (e.g. librados RGW wrappers)
  • add storage option API: Add storage options lancedb/lancedb-c#3

Backend

  • figure out how parallelism is done in lance-io
  • use S3 backend by pointing lancedb back to the RGW
    • auto create the regular S3 bucket to hold the data
    • fetch credentials
  • connect librados as an alternative backend to lancedb-c - this should be done on a ceph fork of lancedb-c
  • connect SAL as an alternative backend to lancedb-c this should be done on a ceph fork of lancedb-c

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)

@github-actions

github-actions Bot commented Oct 27, 2025 •

Copy link
Copy Markdown

Config Diff Tool Output

+ added: rgw_s3vector_s3_region (rgw.yaml.in)
+ added: rgw_s3vector_s3_allow_http (rgw.yaml.in)
+ added: rgw_s3vector_backend (rgw.yaml.in)
+ added: rgw_s3vector_topk_post_filter_factor (rgw.yaml.in)
+ added: rgw_s3vector_s3_endpoint (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.

Comment thread src/rgw/rgw_rest_s3.cc Resolved
@yuvalif

yuvalif commented Nov 20, 2025 •

Copy link
Copy Markdown
Contributor Author

list of PRs to merged into this branch:

Pending fixes for MVP0

Pending fixes to be merged post MVP0

TODOs post MVP0

  • TODO add C++ --> rust async-io solution based on: https://github.com/yuvalif/rust2c-async-io
  • TODO perf/load test tool
  • TODO add a PR to use RAII for freeing resources
  • TODO add a PR to use fieldList for all relevant APIs. whenever an -EINVAL is returned because a client sent an invalid value. note that we should not send fieldList in replies to issues which are result of server side problems, even in case of -EINVAL
    so that multiple RGWs can run on the same host (not a priorty as this is mainly for test environment)
  • TODO followup work from metadata filters:
    • support list types of columns and json fields (requires change to lancedb-c) [part of AWS missing in our implementation]
    • add null support. would require distinction between exists and is null [extension to AWS]
    • add filters on nested objects [extension to AWS]
  • TODO check if we should implement segmented vector listing
  • TODO write developer docs to allow interactions with the S3 objects holdign the data; table schemas etc.
  • TODO wire lancedb logs to ldout
  • TODO support smaller vector types (e.g. int8/16 on top of float32)

Long Term Topics

  • distributed session cache
  • highly sclalable indexes
  • full-text-search

@adamemerson

Copy link
Copy Markdown
Contributor

Sorry to nitpick, could you replace the merge commit at the bottom with cherry-picks?

@adamemerson adamemerson self-assigned this Dec 4, 2025
@yuvalif

yuvalif commented Dec 8, 2025

Copy link
Copy Markdown
Contributor Author

Sorry to nitpick, could you replace the merge commit at the bottom with cherry-picks?

removed the merge commit.
I guess that from now on, we should do not merge PRs into this branch and do cgerry-pick instead

@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

@adamemerson adamemerson added the pinned Use this label if you want to exempt a PR from being stalled label Dec 15, 2025
@yuvalif

yuvalif commented Jan 29, 2026

Copy link
Copy Markdown
Contributor Author

teuthology test results: https://pulpito.ceph.com/yuvalif-2026-01-28_09:07:53-rgw-wip-s3vector-distro-default-trial/
rerun: https://pulpito.ceph.com/yuvalif-2026-01-29_12:54:07-rgw-wip-s3vector-distro-default-trial/

18 failures:

(tempest.api.object_storage.test_object_slo.ObjectSloTest) [0.000000s] ... FAILED
(tempest.api.object_storage.test_container_quotas.ContainerQuotasTest) [0.000000s] ... FAILED
(tempest.api.object_storage.test_container_acl.ObjectTestACLs) [0.000000s] ... FAILED

yuvalif and others added 9 commits September 9, 2026 18:09
* remove the s3 backend option as it creates authentication issues
* purging vectorbucket when user is deleted
* making sure that user is not deleted when it has vector buckets
* allow purging vector buckets with users's data
* make sure that this works for accounts as well. for s3 backend where
  user credentials are needed
* performing fine grained permission checks per operation:
==================== ============================== =================
S3 Vectors operation RGW SAL operations             Permissions
==================== ============================== =================
CreateVectorBucket   list, put, put_cond            List, Put
CreateIndex          list, head, put, put_cond      List, Get, Put
PutVectors           list, head, get, put, put_cond List, Get, Put
DeleteVectors        list, head, get, put, put_cond List, Get, Put
GetVectors           list, head, get                List, Get
ListVectors          list, head, get                List, Get
QueryVectors         list, head, get                List, Get
GetIndex             list, head, get                List, Get
ListIndexes          list, head, get                List, Get
DeleteVectorBucket   list, head                     List, Get
DeleteIndex          list, head, delete             List, Get, Delete
==================== ============================== =================

Signed-off-by: Yuval Lifshitz <[email protected]>
Assisted-by: claude-code:claude-opus-5
* support added based on directory structure for local backend
* tenant added as a parameter to the session for rgw backend

Signed-off-by: Yuval Lifshitz <[email protected]>
Assisted-by: claude-code:claude-opus-5
- 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 <[email protected]>
Assisted-by: claude-code:claude-opus-5
adding md5 and higher resolution mtime
to identify an index that was deleted and recreated
in the same second

Signed-off-by: Yuval Lifshitz <[email protected]>
Assisted-by: claude-code:claude-opus-5
without raw_utf8 every byte of a multi-byte character was escaped on its own
as a separate code point, so: "café" came back as "café"

Signed-off-by: Yuval Lifshitz <[email protected]>
Assisted-by: claude-code:claude-fable-5.1
Assisted-by: claude-code:claude-opus-5
* enforce the key name length only for declared keys
* enforce backtics only for declared keys
* make sure that utf8 keys are supported
* make sure that keys are case sensitive
* make sure that quotes and single quotes are supported

Signed-off-by: Yuval Lifshitz <[email protected]>
Assisted-by: claude-code:claude-opus-5
…anceDB ObjectStore

1) GoogleTest-based tests are added for the rgw_sal_wrapper C FFI API. This test
can be exercised against all the backends. To be able to read config options
(esp., for RADOS backend) it needs to read ceph.conf and hence takes its path as
optional parameter.

The cmd to execute -
./bin/ceph_test_rgw_sal_wrapper -c <path/to/ceph.conf>

2) Add arrow-rs integration tests that exercise the Rust ObjectStore trait
implementation (lancedb-rgw-store) end-to-end through the real FFI
boundary against a live SAL driver.

3) add teuthology workunits for SAL wrapper and LanceDB ObjectStore tests

Add workunit scripts and a teuthology task to run ceph_test_rgw_sal_wrapper
and ceph_test_rgw_lancedb_object_store as part of the rgw/verify suite.

Assisted-by: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Yuval Lifshitz <[email protected]>
Signed-off-by: Soumya Koduri <[email protected]>
Assisted-by: claude-code:claude-opus-5
* make sure that any change to rust code triggers rebuild
* if no change was done, rebuild should be a no-op
* static verification that lancedb-c and the lancedb-rgw-store
  use the same internal struct for the provider

Signed-off-by: Yuval Lifshitz <[email protected]>
Assisted-by: claude-code:claude-opus-5
remove rpath from installed objects

Signed-off-by: Yuval Lifshitz <[email protected]>
Assisted-by: claude-code:claude-fable-5.1
@yuvalif

yuvalif commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

@cbodley @soumyakoduri @galsalomon66 the s3vectos teuthology tests are passing:
https://pulpito-ng.ceph.com/runs/yuvalif-2026-09-11_14:03:42-rgw:s3vectors-wip-s3vector-distro-default-trial

code accumulated in this PR was reviewed in separate PRs (see: #66066 (comment) for the list of PRs as well as remaining work).

please approve if you think this is ready for regression testing.

@yuvalif yuvalif removed the DNM label Sep 14, 2026
* handle utf8 decode errors on admin output
* dont run "local" backend in teuthology, since it
  requires radosgw-admin run as ceph or root for
  user data purging
* avoid an extra period commit when disabling sync
  in teuthology. local runs still do it but wait for
  data sync to finish

Signed-off-by: Yuval Lifshitz <[email protected]>
Assisted-by: claude-code:claude-fable-5.1
prevent crashes in ceph_test_librgw_file_*.
by defining the macro publicly on the rgw target, the same way
WITH_RADOSGW_RADOS is handled.

see:
https://qa-proxy.ceph.com/teuthology/yuvalif-2026-09-16_08:06:42-rgw:verify-wip-s3vector-distro-default-trial/560036/remote/trial056/coredump/

Signed-off-by: Yuval Lifshitz <[email protected]>
Assisted-by: claude-code:claude-fable-5.1
@yuvalif

yuvalif commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor Author

@yuvalif

yuvalif commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

@yuvalif

yuvalif commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

@cbodley

cbodley commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

@yuvalif

yuvalif commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

@cbodley @adamemerson any other tests that needs to run against that branch before merge?

@yuvalif
yuvalif merged commit 0665ed1 into main Sep 17, 2026
26 checks passed
@yuvalif
yuvalif deleted the wip-s3vector branch September 17, 2026 17:16
@tchaikov tchaikov mentioned this pull request Oct 25, 2026
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build/ops common config-change documentation needs-qa pinned Use this label if you want to exempt a PR from being stalled rgw tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.