Repository navigation
Conversation
233916d to
4a57fcd
Compare
4a57fcd to
6d1e6ef
Compare
6d1e6ef to
a0f2896
Compare
a0f2896 to
76b8efa
Compare
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]>
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
76b8efa to
e7ce95d
Compare
b54ce48 to
c209165
Compare
b3880cd to
d14af1a
Compare
0047bc0 to
ddd87f4
Compare
| // TODO: build the arrow schema when creating the table and store the C ABI schema | ||
| // as an attrribute of the vectore bucket | ||
| struct ArrowSchema c_schema; | ||
| if (int ret = create_table_schema(configuration.dimension, dpp, &c_schema); ret < 0) { |
There was a problem hiding this comment.
the dimension is persistent(not directly, it is created according to the saved vector size).
the distance_metric is not persistent (so the query may use wrong distance_metric) --> wrong result.
since, this PR using the local-fs, the index properties should saved also locally.
(the non_filterable_metadata_keys and creation_time also missing)
There was a problem hiding this comment.
thr plan is to add these as VectorBucket attributes (held per vector bucket index).
i also plan to cache the index (=table) schema there, so it does not need to be retrieved from the table for every action.
| .replace = 1, // replace existing index | ||
| .force_update_statistics = 0 // don't force update statistics | ||
| }; | ||
| if (const LanceDBError result = lancedb_table_create_scalar_index( |
There was a problem hiding this comment.
the schema is currently hardcoded ("key" ,"data") , there is no dynamic metadata (passed by the user) that actually persist between calls (put-vector , query-vector).
the data-type is always "float32".
the scalar-btree is saved into lance-index-files (local fs) , the same is with the vector-data.
i guess the hardcoded thing is on purpose for the current phase.
in order to verify that variety of lance-db-functions works properly, it need to remove the hard coded definitions.
There was a problem hiding this comment.
the "key" and "data" will be hardcoded in the future as well, since the s3vectors API does not give the user any freedom with these fields.
regarding metadata, the plan is to *deviate from the AWS API and treat the "non-filterable-metadata" as "filterable-metadata".
this would mean, that, for the list of metadata fields that are "filterable", we would create matching columns in the table, while any other metadata values will just go into a json encoded "metadata" column.
however, this will be implemented in later phases. for now we will just have non-filterable metadata support (meaning, just put values and fetch them)
if we want to support the API, as AWS defined it, we would need to:
- add something like duckdb for holding the metadata values
- join with the lancedb table to perform "after-the-fact" query
not sure we would like to do that... but still an option
There was a problem hiding this comment.
important notes.
as mentioned it's better to deviate from the AWS API, i.e.
for one thing, we can add schema-definition to s3-vector-create-index API (the user knows upfront what is the required schema)
another option, is deduce the schema from the data attached to put-vector, it's flexible and user friendly approach.(comes with some complexity)
the lancedb-engine contain table_add_columns API (it needs C wrapper), so we can dynamically add columns as data streaming in.
there is no need for external engine on-top of lance-db, once the lancedb engine knows what is the schema, and also "knows" about the scalar indexes, the lancedb engine has the option to run pre-filter or post-filter(per user request), and to use the schema scalar-indexes efficiently.
the option of adding a "generic data field (JSON that can contain all)" , is simple but problematic (performance perspective).
(i checking the different options with a prototype application.)
There was a problem hiding this comment.
important notes.
as mentioned it's better to deviate from the AWS API, i.e. for one thing, we can add schema-definition to
s3-vector-create-indexAPI (the user knows upfront what is the required schema)
beside adding columns based on the metadata fields that we want to make searchable, what kind of schema changes do you want to support?
what would eb the usecase (assuming s3vectors goal is not to replaces an interactive vectordb implementation).
another option, is deduce the schema from the data attached to put-vector, it's flexible and user friendly approach.(comes with some complexity) the lancedb-engine contain
table_add_columnsAPI (it needs C wrapper), so we can dynamically add columns as data streaming in.
i don't think this would scale. each vector put (and we can have millions of these in an index) will be able to add columns to the table
there is no need for external engine on-top of lance-db, once the lancedb engine knows what is the schema, and also "knows" about the scalar indexes, the lancedb engine has the option to run pre-filter or post-filter(per user request), and to use the schema scalar-indexes efficiently.
not sure what you mean by external engine?
if we know the schema (including the searchable metadata fields) upon index creation, we will create the table at that point.
if a searchable column is just generic string column, we can create a btree index at that point, if the column has some low cardinality value, the background process will be able to create a bitmap index on it once there is some data in the table.
the option of adding a "generic data field (JSON that can contain all)" , is simple but problematic (performance perspective).
the s3vectors API allow sending a JSON metadata object together with each vector. this is not an optional feature, we have to support that,
if these values does not need to be used as filters, we will just store then in a column so it could be fetched later
(i checking the different options with a prototype application.)
There was a problem hiding this comment.
important notes.
as mentioned it's better to deviate from the AWS API, i.e. for one thing, we can add schema-definition tos3-vector-create-indexAPI (the user knows upfront what is the required schema)
beside adding columns based on the metadata fields that we want to make searchable, what kind of schema changes do you want to support? what would eb the usecase (assuming s3vectors goal is not to replaces an interactive vectordb implementation).
it need to support a table schema-definition, that is essential. as for schema changes, it is also essential (rollback mistakes, user need a change), it not about replacing-interactive, it's about minimal and vital operations.
another option, is deduce the schema from the data attached to put-vector, it's flexible and user friendly approach.(comes with some complexity) the lancedb-engine contain
table_add_columnsAPI (it needs C wrapper), so we can dynamically add columns as data streaming in.
i don't think this would scale. each vector put (and we can have millions of these in an index) will be able to add columns to the table
for sure it should be limited ( no more than X metadata fields), in any case the put-vector api, should be validated as for its data integrity.
there is no need for external engine on-top of lance-db, once the lancedb engine knows what is the schema, and also "knows" about the scalar indexes, the lancedb engine has the option to run pre-filter or post-filter(per user request), and to use the schema scalar-indexes efficiently.
not sure what you mean by external engine? if we know the schema (including the searchable metadata fields) upon index creation, we will create the table at that point. if a searchable column is just generic string column, we can create a btree index at that point, if the column has some low cardinality value, the background process will be able to create a bitmap index on it once there is some data in the table.
upon lancedb is "aware" of the table metadata-columns, its engine able to create and use scalar-index upon search, and to use that efficiently with its query-planner. the lancedb-engine is able to "merge" the vector-index-search(IVF) with the scalar index result(list of row-id's)
not clear why it needs to create a btree-index (the duckdb was mentioned in comment as an external engine)
the option of adding a "generic data field (JSON that can contain all)" , is simple but problematic (performance perspective).
the s3vectors API allow sending a JSON metadata object together with each vector. this is not an optional feature, we have to support that, if these values does not need to be used as filters, we will just store then in a column so it could be fetched later
there is no problem with storing data into a string data type.
the JSON metadata is not searchable, and upon fetching it, it need to extract the data-fields from the JSON format (no issue with that).
(i checking the different options with a prototype application.)
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
i dont understand why this is essential? |
|
points been discussed |
…n empty payload hash computed for UNSIGNED-PAYLOAD. use that hash for the header 'x-amz-content-sha256' in AWSSignerV4::prepare() Signed-off-by: Shilpa Jagannath <[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]>
Signed-off-by: Yuval Lifshitz <[email protected]>
ddd87f4 to
8bd836f
Compare
|
teuthology results (beforte rebase): https://pulpito.ceph.com/yuvalif-2026-03-12_09:10:04-rgw:s3vectors-wip-add-lancedb-distro-default-trial/ - PASS |
|
teuthology resultrs after rebase of wip-s3vectors: https://pulpito.ceph.com/yuvalif-2026-03-12_18:07:34-rgw:s3vectors-wip-add-lancedb-distro-default-trial/ pass |
|
cherry-picked into #66066 |
s3vector APIs:
CreateIndex- implemented (schema should be cached as a vector bucket attribute after the vector bucket PR is merged)CreateVectorBucket- mainly implemented in the vector bucket PRDeleteIndex- implementedDeleteVectorBucket- mainly implemented in the vector bucket PR, here we are doing cascade deletion of all indexes (lancedb tables)DeleteVectorBucketPolicy- will be done as followup PRDeleteVectors- implementedGetIndex- implementedGetVectorBucket- mainly implemented in the vector bucket PRGetVectorBucketPolicy- will be done as followup PRGetVectors- implementedListIndexes- implementedListTagsForResource- not in scopeListVectorBuckets- implemented in the vector bucket PRListVectors- implementedPutVectorBucketPolicy- will be done as followup PRPutVectors- implementedQueryVectors- implementedTagResource- not in scopeUntagResource- not in scope