Commit Graph

507 Commits

Author SHA1 Message Date
Jojii
e87123b767 IO metrics in hw counter types (#5769)
* io metrics in hw counter types

* Add new metrics to `new_with`
2025-01-16 10:49:53 +01:00
Tim Visée
1a340ddc81 Resharding: expose operations in cluster info (#4599)
* Expose resharding operations in cluster info

* Fix collection info conversion to gRPC
2025-01-16 10:49:31 +01:00
Tim Visée
e545b6964b Bump version to 1.12.6 (#5759)
* Bump version to 1.12.6

* Update missed cherry picks
2025-01-08 15:43:27 +01:00
Tim Visée
9b486ccfb7 Filter out empty filter conditions from gRPC (#5690)
* Filter out empty filter conditions from gRPC rather than error

* Link pull request
2025-01-08 14:09:54 +01:00
Roman Titov
69b7e0e473 Abort scale-down resharding on update error (#5670) 2025-01-08 14:09:01 +01:00
Tim Visée
3decc3ca20 Fix collection creation validation, disallow replication factor 0 (#5643)
* Validate default collection config in settings

* Validate shard number, replication/write consistency factor in gRPC

* Cleanup

* Add more validation rules

* Also validate strict mode config in gRPC CollectionConfig

* Update OpenAPI specification
2025-01-08 14:08:25 +01:00
Luis Cossío
8b4e798948 Enable resetting max_optimization_threads to automatic (#5634)
* Allow max-optimization-thread config to be set to null on update

* add new field. Support both, but prepare for deprecation.

* better openapi

* only introduce change in OptimizersConfigDiff

* move to `api::rest::schema`

* update openapi

* improve test, fix diff to config conversion

* upd grpc docs

* clippy

* remove schemars from common common

---------

Co-authored-by: Gulshan Kumar <kumargu@amazon.com>
2025-01-08 14:07:50 +01:00
Arnaud Gourlay
947e79e054 Strict mode for payload storage (#5588)
* Strict mode for payload storage

* Don't increment counter multiple times per request

* Add (loose) integration tests for payload storage limit

* Minor improvements

* minor renaming

* Update lib/api/src/grpc/proto/collections.proto

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

---------

Co-authored-by: jojii <jojii@gmx.net>
Co-authored-by: Jojii <15957865+JojiiOfficial@users.noreply.github.com>
Co-authored-by: Tim Visée <tim+github@visee.me>
2025-01-08 14:07:24 +01:00
Luis Cossío
681506cea7 Integrate mmap bool index (#5571)
* add on_disk option for bool index

* test that all files are covered

* generate openapi and docs

* clippy

* remove `populate` changes

* use `walkdir` crate

* Apply clippy suggestions

---------

Co-authored-by: timvisee <tim@visee.me>
2025-01-08 14:04:24 +01:00
Tim Visée
93b57186de Simplify gRPC validation (#5650) 2025-01-08 14:03:59 +01:00
Jojii
5aee24cc08 Timeout aware hardware counter (#5555)
* Make hardware counting timeout aware

* improve test

* rebuild everything

* fmt

* post-rebase fixes

* upd tests

* fix tests

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-01-08 14:03:52 +01:00
Arnaud Gourlay
993121b3ea Rate limit requests per minute (#5597)
* Rate limit requests per minute

* rename to remove time unit for API
2025-01-08 14:01:28 +01:00
Tim Visée
27260abda7 Bump version to v1.12.5 (#5611)
* Bump version to 1.12.5

* Update missed cherry picks
2024-12-09 14:38:58 +01:00
Arnaud Gourlay
3c19eea9ca Rate limiting for shard operations (#5582)
* Rate limiting for shard operations

* address all review comments in one go
2024-12-09 11:18:50 +01:00
Redouan El Rhazouani
b94f13a608 Optimize JSON-Proto Conversion, Improve Memory Allocation, and Add Unit Tests (#5591)
* Optimize JSON-Proto conversion and add unit tests
 * mproved memory allocation by eliminating raw loops
 * Enhanced readability by reducing nesting and restructuring logic for clarity
 * Added tests to assert correctness and reliability of the JSON-Proto conversion process

* Resolve clippy issues
2024-12-09 11:18:38 +01:00
Jojii
0702854477 Strict mode max collection vector size (#5501)
* Strict mode config: Max collection size

* api specs

* Add tests + set/update payload check

* Improve function names and add comments

* rename config to separate vectors and payload

* fix tests

* Adjust configs docs

* add benchmark

* improve performance by caching shard info

* add bench for size_info() and fix tests

* Also limit the batch-size for vector updates (#5508)

* Also limit the batch-size for vector updates

* clippy

* add lost commit

* Load cache on collection initialization

* add unit type to parameter name

* fix renaming in test

* clearer error message

* fix test

* review remarks

* remove unused function for now

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2024-12-09 11:18:33 +01:00
Luis Cossío
13b85639b6 Friendlier untagged enum errors (#5580)
* add friendlier errors for untagged enums

* alias with_vector and with_vectors in query api
2024-12-09 11:18:08 +01:00
Luis Cossío
b941da5dc1 improve QueryInterface error message (#5546) 2024-12-09 11:08:51 +01:00
Arnaud Gourlay
83cd887fcd Return complete error for sparse vector validation (#5536)
* Return complete error for sparse vector validation

* remove unecessary path

* update test to show new value
2024-12-09 11:08:07 +01:00
Jojii
7b83223c8c Add max upsert batch size strict mode option (#5485) 2024-12-09 10:48:49 +01:00
Jojii
fd1b75873e Add hardware metrics to /metrics and /telemetry API (#5408)
* add hardware metrics to /telemetry and /metrics

* move all_hw_metrics function
2024-12-09 10:47:48 +01:00
Luis Cossío
21ba00d284 Transfer blob_store into this repo (#5436)
* copy-paste blob_storage

* get rid of copied utils

* fix clippy

* fmt

* audit blob_store manifest

* move `Payload` into `fixtures.rs`

* fix clippy

* put csv in google storage

* ignore hm test

* fix codespell

* improve files test

* test different block sizes

* remove unused deps

* replace StdRng with SmallRng for faster tests
2024-12-09 10:45:43 +01:00
Andrey Vasnetsov
5b578c4f34 bump version to v1.12.4 (#5461)
* bump version to v1.12.4

* Update missed cherry picks

---------

Co-authored-by: timvisee <tim@visee.me>
2024-11-18 14:54:03 +01:00
Jojii
b4e30ad6bf Per collection hardware measurements (#5453)
* Add HwMeasurementCollector

* Add hardware reporting to TOC + RequestHwCounter

* Pass HwMeasurementAcc by reference + Update accumulation

* Update tests and benchmarks

* update REST API

* Update gRPC API

* codespell

* Adjust internal API

* improve docs

* introduce drain to the HwMeasurementAcc

* fmt

* use drain to report to the collection counter

* implement hw metrics drain for internal and external queries

* fix drinage

* refactor rest models: move away from grpc crate

* fmt

* implement usage reporting to collection acc for rest api

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-18 11:21:05 +01:00
n0x29a
9f8ae97ed5 allow inference for Documents in points (grpc + rest) (#5447)
* allow inference for Documents in points (grpc + rest)
* move validation to documents & images

---------

Co-authored-by: n0x29a <n0x29a@example.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-18 11:18:12 +01:00
George
609d5c5d46 Make model name field mandatory in inference structures (#5431)
* Make model name field mandatory in inference structures

* fix batch tests
2024-11-18 11:09:51 +01:00
Tim Visée
7629faa652 Bump version to 1.12.3 (#5429)
* Bump version to 1.12.3

* Update missed cherry picks
2024-11-12 16:29:02 +01:00
George
c366debede update Image.image type to Value instead of string (#5403)
* update Image.image type to Value instead of string

* apply cargo fmt

* fix tests
2024-11-12 14:39:09 +01:00
Tim Visée
69e5cee076 Bump version to 1.12.2 (#5404)
* Bump version to 1.12.2

* Update missed cherry picks
2024-11-08 15:14:57 +01:00
Jojii
faf645ec2e Hardware counting for quantization (#5369)
* add cpu measurement for quantization

* clippy

* fix tests

* discard hardware counters in benchmarks

* Forwarding hardware counter in distributed setup (#5371)

* make hardware counter available in distributed setup

* clippy

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-08 11:26:39 +01:00
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
n0x29a
097508d07d Inference Service, query requests (batch processing) (#5329)
* Inference Service, query requests (batch processing)

---------

Co-authored-by: n0x29a <n0x29a@example.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-08 11:23:22 +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
n0x29a
672740540e Inference Service, query requests (rest) (#5295)
* Inference Service, query requests (rest)

---------

Co-authored-by: n0x29a <n0x29a@example.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2024-11-08 11:12:26 +01:00
Tim Visée
6f51df0124 Make some or's more lazy (#5255)
* In config merge, lazily replace overrides versus proactively taking out

* Add helper function to replace option if value is some

* Make some eager ors more lazy

* Do not aggressively take out
2024-11-08 11:08:35 +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
Andrey Vasnetsov
9c20e9e279 bump version to v1.12.1 (#5223) 2024-10-11 20:15:45 +02:00
Andrey Vasnetsov
a0d2eccac0 bump version to v1.12.0 (#5203) 2024-10-08 14:33:47 +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
Tim Visée
dee106d746 Bump version to 1.11.5 (#5121)
* Bump version to 1.11.5

* Update missed cherry picks
2024-09-23 17:10:35 +02:00
Tim Visée
d8b6e4a0c2 Bump version to 1.11.4 (#5098)
* Bump version to 1.11.4

* Update missed cherry picks
2024-09-17 17:04:40 +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
Tim Visée
faf4407c19 Allow shard transfer from/to the same peer if from/to shard ID is different (#5034) 2024-09-17 15:26:58 +02:00
Andrey Vasnetsov
d0ccf4fc96 Better json path parsing errors (#5035)
* report malformed json path inside error

* fmt
2024-09-17 15:26:35 +02:00
Arnaud Gourlay
0de10604fb Distance matrix docs improvements (#5023)
* docs improvements

* improve openapi description
2024-09-17 15:26:19 +02:00