Commit Graph

468 Commits

Author SHA1 Message Date
Jojii
13cabb32e4 Add hardware usage to grpc API (#5333)
* Add hardware usage to grpc API

* generate grpc docs
2024-11-08 11:25:36 +01:00
Jojii
cc807cbfbc Add hardware measurements in API (#5306)
* add HwMeasurementAcc and API helpers+types

* add config to API to toggle hardware reporting in API responses

* add Default impl for HwMeasurementAcc

* comments

* review remarks

* include usage into API schema

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-08 11:19:25 +01:00
Andrey Vasnetsov
bcf05d9e23 HasVector filtering condition (#5303)
* include vector storage into struct vector index

* implement has_vector

* generate schemas

* refactor query filter optimizer so avoid too many function arguments

* test + fix for sparse vectors

* Update lib/segment/src/index/struct_payload_index.rs

Co-authored-by: Jojii <15957865+JojiiOfficial@users.noreply.github.com>

* Update lib/segment/src/index/query_optimization/optimizer.rs

Co-authored-by: Jojii <15957865+JojiiOfficial@users.noreply.github.com>

* fmt

---------

Co-authored-by: Jojii <15957865+JojiiOfficial@users.noreply.github.com>
2024-11-08 11:17:37 +01:00
Kumar Shivendu
390d4c4503 Track vector storage usage in bytes for each of the segments (#5292)
* Track disk usage for each of the vectors and segments

* Dont extend vector_data field

* Remove comment and improve var name

* Introduce vectors_size_bytes and rename available_size_in_bytes

* Introduce vectors_size_bytes and rename available_size_in_bytes

* fix linter

* Avoid converting to u64

* calculate vectors_size_bytes for proxy segments

* Fix OpenAPI spec

* fix typo
2024-11-08 11:16:04 +01:00
Arnaud Gourlay
b2a7f01236 Report memory usage in metrics & telemetry (#5266)
* Report memory usage in metrics & telemetry

* Fenster reparatur

* fix error handling & openapi spec

* follow naming convention

* show memory stats on level1

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-08 11:15:43 +01:00
Kartik Gupta
2f5e7d2eb0 Remapping tags to api docs (#5104)
* Remapping tags to

* Declare new tags, v1.12 remapping

* Declare Indexes, Aliases

---------

Co-authored-by: Anush <anushshetty90@gmail.com>
2024-11-08 11:15:37 +01:00
Tim Visée
bdf8242413 Minor improvements around the WAL delta fix (#5286)
* Restructure WAL delta logic, similar to what we had before the patch

* Tweak comments to elaborate on data race fix

* Refactor recovered function, not snapshot specific anymore

* Remove partial snapshot replica set state from schema
2024-11-08 11:12:01 +01:00
Arnaud Gourlay
d4716da8e7 fix lints for Clippy 1.82 (#5229)
* fix lints for Clippy 1.82

* regen openapi
2024-11-08 10:59:36 +01:00
Jojii
a0de9509d7 Add strict mode config to update collection API + Populate strict mode in API (#5187)
* add strict mode to update collection API

* update API specs

* clippy

* Update lib/storage/src/content_manager/toc/collection_meta_ops.rs

* Strict mode integration tests (#5189)

* Add integration tests for strict mode

* add full update test

* Apply suggestions from code review

Co-authored-by: Tim Visée <tim+github@visee.me>

* Adjust error messages

* improve checking of error response

---------

Co-authored-by: Tim Visée <tim+github@visee.me>

* prefer explicit structu conversion

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-08 10:59:32 +01:00
Andrey Vasnetsov
1d0ee7ea32 Inference interface in REST and gRPC (#5165)
* include document & image objects into grpc API

* introduce image and object to rest api

* minor refactoring

* rename Vector -> VectorInternal

* decompose vector data structures

* add schema

* fmt

* grpc docs

* fix conversion

* fix clippy

* fix another conversion

* rename VectorInput -> VectorInputInternal

* replace grpc TryFrom with async functions

* fmt

* replace rest TryFrom with async functions

* add image and object into query rest

* separate inference related conversions

* move json-related conversions into a separate file

* move vector-related transformations into a separate file

* move more vector related-conversions into dedicated module
2024-11-08 10:55:15 +01:00
Tim Visée
347c1945b1 Report CPU endianness in telemetry output (#5180)
* Report CPU endianness in telemetry output

* Make endianness optional, don't report if anonymizing telemetry

* Update OpenAPI definition

* Switch back to single compile time endianness check

* Update OpenAPI specification

* Remove cpu-endian dependency

* De-anonymize CPU endianness

---------

Co-authored-by: xzfc <xzfcpw@gmail.com>
2024-11-08 10:54:46 +01:00
Andrey Vasnetsov
a0d2eccac0 bump version to v1.12.0 (#5203) 2024-10-08 14:33:47 +02:00
Andrey Vasnetsov
8a66b38368 make operationId consistent with grpc (#5201) 2024-10-08 13:36:20 +02:00
Ivan Pleshkov
aa7e33b68b mmap geo index api (#5163)
* define mmap geo index

fix compilation

deleted flags

load new mmap

geo index tests

fix tests

fix build after rebase

add files list

* refactor get_stored_sub_regions output type

* review remanings

* mmap geo index api

* fix after rebase
2024-10-08 13:30:08 +02:00
Luis Cossío
ad6b9734f3 Facets: Support for bool payload (#5100)
* enable faceting with boolean index

* test and fix

* also test uuid
2024-10-08 13:11:36 +02:00
Jojii
05b8dca540 [Strict mode] Merge StrictMode config types (#5137)
* merge StrictModeConfig and StrictModeConfigDiff into one type

* review remarks
2024-10-08 13:10:33 +02:00
Jojii
0b236d8107 [Strict mode] default config (#5037)
* add default config for strict mode

* add default values as example to config/config.yaml

* improve implementation

* update grpc docs
2024-10-08 13:09:56 +02:00
Luis Cossío
cf89715036 Expose on_disk text index (#5074)
* map index: fix reachable code marked as unreachable

* plumber work to get mmap text index to interfaces

* test: add fixture for mmap text index, always create mmap segment

* various fixes

- ensure dir is created for mmap
- implement is_on_disk() for text index
- invert deleted condition for filter in mmap inverted index

* update grpc docs and openapi

* implement return of files

* review nit

* fix after rebase

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-09-17 15:30:17 +02:00
Andrey Vasnetsov
1589d119fc make resharding_operations optional, so OpenAPI is properly generated (#5060)
* make resharding_operations optional, so OpenAPI is properly generated

* Return None early

---------

Co-authored-by: timvisee <tim@visee.me>
2024-09-17 15:28:36 +02:00
Kumar Shivendu
70c46bbb6f Track number of points optimized and expose in telemetry (#5000)
* Track number of points optimized and expose in telemetry

* refactor

* openapi specs

* remove dbg

* Return num points optimized from optimize() func

* fmt

* fix

* fix type in tests

* Store total points indexed on shard level instead of optimization level

* fmt

* fix test

* trigger ci

* fix openapi schema

* review fixes

* fmt

* improvements and fix test

* review fixes

* use const for indexing optimizer name

* fmt

* return segment id from optimize() func

* review fixes

* fix

* fix

* fik

* minor var name improvement

* Use Option<usize> to return segment id

* Use segment ID type rather than ambiguous usize

* fix test

* avoid intermediate check

* review fixes

* Rename total_indexed_points to total_optimized_points

* Update openapi schema

* optimize() should return number of points in new segment instead of segment id

* add else condition

* take read lock

* fmt

* remove flaky assert

* Count points on new segment without locking

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-09-17 15:28:00 +02:00
Tim Visée
4f7b675fe8 Remove max_segment_number from quick start and OpenAPI definition (#5058) 2024-09-17 15:27:53 +02:00
Andrey Vasnetsov
52700c52d8 custom key to hide kwt dashboard (#5056) 2024-09-17 15:27:12 +02:00
Tim Visée
41ea2bc75c Expose cluster metadata in telemetry (#5019)
* Expose cluster telemetry in metadata

* Only expose metadata in telemetry for details level 1 and up

* Update OpenAPI specification

* move metadata into cluster telemetry

* regen openapi

* use Option instead of raw hashmap

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-09-17 15:26:26 +02:00
Arnaud Gourlay
0de10604fb Distance matrix docs improvements (#5023)
* docs improvements

* improve openapi description
2024-09-17 15:26:19 +02:00
Kumar Shivendu
3568286132 Introduce grey collection status and expose shard status in telemetry (#4940)
* Expose shard status in telemetry API

* fmt

* Drop segment lock before using async fetching shard status

* Use Self in From implementation for ShardStatus to CollectionStatus mapping

* Improve comments

* Remove redundant clone

* Update openapi specs

* Isolate function for shard status

* Fix compiler error

* Avoid adding dedicated function for shard status

* review fixes

* define missing var

* lint err

* comment

* comment

* refactor

* improve comments

* Improve comments

* fix lint and update openapi specs

* improve comment
2024-09-17 15:26:09 +02:00
Arnaud Gourlay
ba57d63200 gRPC API for Distance Matrix (#5011)
* gRPC API for Distance Matrix

* generate API docs

* apply correct limit to sample

* add JWT tests

* pluralitiy

* fix COO naming

* drops COO as it trips codespell and is redundant

* clarify docs
2024-09-17 15:26:02 +02:00
Jojii
3377530c62 [Strict-Mode] Basic implementation (#4887)
* add CollectionRequestVerification

* add to api

* rebase

* improve implementation

* implement strict mode for SearchRequest+Batch

* improve code + fix Clippy

* improve error handling

* restructure StrictModeVerification trait

* generate docs

* check `enabled` option

* review remarks

* rename StrictModeConfigDiff in grpc

* use missing payload detection from issue api

* performance improvement

* decouple extractor from issues (#4945)

* some review remarks

* don't default to empty functions in StrictModeVerification trait

* update openapi

* filter_limit => query_limit

* replace discovery_max_context_size and recommend_max_examples with max_input_examples

* review remarks

* review fix: include possible index types into error message

* review remarks

---------

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-08-29 15:24:11 +02:00
Luis Cossío
f7de6c9017 Facets: add consistency param to openapi (#4969)
* add consistency param to openapi

* interpret uuid map index as facet index too
2024-08-29 15:24:05 +02:00
Luis Cossío
4b429214cc Integer and UUID facets (#4946)
* move FacetIndex into facet_index.rs

* add support for integer facets

* add support for uuid facets

* use separate internal structure

* rename FacetValue::Keyword into FacetValue::String in REST

* fix after rebase
2024-08-28 15:18:21 +02:00
Tim Visée
29f7861d31 Expose resharding operations for collection in telemetry (#4938)
* Expose resharding operations for collection in telemetry

* Update OpenAPI spec
2024-08-28 15:18:18 +02:00
Andrey Vasnetsov
9573162ffe include peers list into telemetry (#4947) 2024-08-27 01:14:45 +02:00
Andrey Vasnetsov
35e0ef8a7d Data structures for inference (#4936)
* add document to VectorStruct

* fmt

* add document to BatchVectorStruct

* add document to VectorInput

* add document to Vector

* upd openapi
2024-08-27 01:13:19 +02:00
Luis Cossío
5f5fd25d64 Add grpc endpoint for Facet (#4933)
* add grpc endpoint

* gen grpc docs
2024-08-27 01:13:12 +02:00
Luis Cossío
3185dd23c5 Exact facet mode (#4878) 2024-08-27 01:09:27 +02:00
Luis Cossío
ace8a90259 Facets in REST (#4848)
* rename to FacetRequestInternal

* add rest endpoint

* fix correctness by fetching the whole list of values

* fix mmap map index variant

Also removes test for sorted output, for now

* add ytt spec

* fix clippy

* use hashmap inside of local shard

* rename operation to `facet`, add access test

* whitelist endpoint

* change api

* make limit optional
2024-08-27 01:08:53 +02:00
Andrey Vasnetsov
e37a9ea2d5 make range and lookup params optional (#4905) 2024-08-27 01:07:00 +02:00
Arnaud Gourlay
faab853b86 Search distance matrix REST API (#4884)
* Search distance matrix REST API

* apply Validator upgrade

* min sample size is 2 thanks Luis

* review: rethink pair view

* remove rows-based similarity matrix output

* fmt

* upd openapi

* we have only 70 apis now

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-08-27 01:06:50 +02:00
Tim Visée
6336395685 Bump version to 1.11.0 (#4865)
* Bump version to 1.11.0

* Update missed cherry picks

* Update OpenAPI spec and redoc
2024-08-12 16:29:32 +02:00
Andrey Vasnetsov
94ed6a1fb8 docs: Use // for proto comments (#4852)
* docs: Use // for proto comments

* docs: Update gRPC

* chore: regen

---------

Co-authored-by: Anush <anushshetty90@gmail.com>
2024-08-09 18:19:59 +02:00
xzfc
f6493e786b Add shell.nix (#4821) 2024-08-09 18:19:55 +02:00
Arnaud Gourlay
c2dca53e81 Add missing timeout query params in openapi specs (#4850)
* Add missing timeout query params in openapi specs

* get_points as well
2024-08-09 18:19:47 +02:00
Jojii
564c085d4b On-disk Uuid hybrid-index (#4825)
* Migrate uuid index to mmap

* add uuid numeric index

* select correct index + tenants

* Only serialize if necessary

* select correct index

* reset Cargo.toml

* review: use only map index for uuid for now

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-08-09 18:19:39 +02:00
Andrey Vasnetsov
649560fefd Use mmap lock as default vector storage (#4828)
* add force_ram parameter to chuncked mmap vector storage

* enable mlocked mmap vector storage on unix by default

* regen openapi

* add mlock on creation of chunck

* minor unrelated renaming

* rollback changes in LockedChunkedMmap

* fmt

* make AppendableMmapDenseVectorStorage generic of storage type

* make AppendableMmapMultiDenseVectorStorage generic of storage type

* implement initialization of InRamChunkedMmap

* implement MultiDenseAppendableInRam and variations

* enable InRamChunkedMmap for multivectors

* use same CHUNK_SIZE for mmap and regular chuncked vectors

* enable InRamChunkedMmap by default

* fix tests

* rollback usage of InRamChunkedMmap by default

* review changes

* add assertion on chunk_capacity [skip-ci]
2024-08-09 18:19:35 +02:00
Arnaud Gourlay
93f04a3f49 Add and fix missing timeout in the retrieve APIs (#4842)
* Add and fix missing timeout in the retrieve APIs

* no need for extra timeout handling as single ops are doing it

* don't surface timeout too high in shard transfer infra

* add todos for future work

* update timeout after first query
2024-08-09 18:19:09 +02:00
Arnaud Gourlay
8c730c88d5 Add missing integration steps to new API doc (#4824) 2024-08-09 18:18:16 +02:00
xzfc
f225e5865a chore: move tests/openapi/openapi_integration/* → tests/openapi/* (#4820) 2024-08-09 18:17:44 +02:00
Luis Cossío
88fa434f53 Facets in internal service (#4790)
* add `facet` to shard trait

* Add internal service

* gen grpc docs
2024-08-09 18:17:00 +02:00
Jojii
20b0199aff Rename tenant to principal for float,int,datetime (#4789)
* Rename tenant to principal for float,int,datetime

* Apply review proposal
2024-08-09 18:16:25 +02:00
Jojii
e6bc3af29c fix tenants not getting applied from API (#4763) 2024-08-09 18:15:19 +02:00
Tim Visée
67217002fe Implement resharding down (#4697)
Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2024-08-09 18:15:15 +02:00