Commit Graph

467 Commits

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

* Add new metrics to `new_with`
2025-01-10 18:28:34 +01:00
Tim Visée
306f4a88ce Resharding: expose operations in cluster info (#4599)
* Expose resharding operations in cluster info

* Fix collection info conversion to gRPC
2025-01-10 11:50:31 +01:00
Tim Visée
9e359db714 Bump dev version to 1.12.7-dev (#5760) 2025-01-08 16:05:35 +01:00
Tim Visée
db80432f8b Filter out empty filter conditions from gRPC (#5690)
* Filter out empty filter conditions from gRPC rather than error

* Link pull request
2024-12-24 21:36:56 +00:00
Roman Titov
8beb1106a6 Abort scale-down resharding on update error (#5670) 2024-12-24 13:58:32 +01:00
Tim Visée
2f7cde3d45 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
2024-12-20 12:07:58 +01:00
Luis Cossío
daef7134e2 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>
2024-12-18 17:17:47 -03:00
Arnaud Gourlay
229fa94f69 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>
2024-12-17 17:33:46 +01:00
Luis Cossío
14c1979a47 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>
2024-12-16 20:35:10 -03:00
Tim Visée
7d52c95253 Simplify gRPC validation (#5650) 2024-12-16 12:46:43 +01:00
Jojii
e0d0e233d8 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>
2024-12-10 12:12:36 +01:00
Arnaud Gourlay
2a2a7033db Rate limit requests per minute (#5597)
* Rate limit requests per minute

* rename to remove time unit for API
2024-12-10 00:26:37 +01:00
Tim Visée
3c394f7131 Bump dev version to 1.12.6-dev (#5612) 2024-12-09 14:40:22 +01:00
Arnaud Gourlay
1e21a4a179 Rate limiting for shard operations (#5582)
* Rate limiting for shard operations

* address all review comments in one go
2024-12-06 11:02:18 +01:00
Redouan El Rhazouani
0c55bcc53d 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-06 10:43:58 +01:00
Jojii
42fd2e27e2 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-05 17:28:09 +01:00
Luis Cossío
5003b85719 Friendlier untagged enum errors (#5580)
* add friendlier errors for untagged enums

* alias with_vector and with_vectors in query api
2024-12-03 17:53:22 -06:00
Luis Cossío
ed668c636f improve QueryInterface error message (#5546) 2024-11-28 16:26:37 -06:00
Arnaud Gourlay
36d07a5444 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-11-28 12:27:12 +01:00
Jojii
5417428951 Add max upsert batch size strict mode option (#5485) 2024-11-19 19:06:57 +01:00
Jojii
55b193a2c8 Add hardware metrics to /metrics and /telemetry API (#5408)
* add hardware metrics to /telemetry and /metrics

* move all_hw_metrics function
2024-11-19 15:08:04 +01:00
Tim Visée
1ade25901a Bump dev version to 1.12.5-dev (#5476) 2024-11-19 13:09:47 +01:00
Luis Cossío
b895bcd872 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-11-18 12:43:52 -06:00
Jojii
b83ace82f0 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-17 12:46:01 +01:00
n0x29a
7833fba05f 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-15 10:31:05 +01:00
George
15656e9110 Make model name field mandatory in inference structures (#5431)
* Make model name field mandatory in inference structures

* fix batch tests
2024-11-12 17:00:27 +01:00
Tim Visée
9d83ef2a6d Bump dev version to 1.12.4-dev (#5432) 2024-11-12 16:56:12 +01:00
George
ccc5551701 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-08 20:50:27 +01:00
Tim Visée
48c02b29c7 Bump dev version to 1.12.3-dev (#5407) 2024-11-08 17:33:39 +01:00
Tim Visée
f81b119ce0 Bump dev version to 1.12.2-dev (#5392) 2024-11-07 11:45:46 +01:00
Jojii
7b677fb7fa 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-06 16:23:02 +01:00
Jojii
e35ec150df Add hardware usage to grpc API (#5333)
* Add hardware usage to grpc API

* generate grpc docs
2024-11-05 16:15:39 +01:00
n0x29a
717594bdf5 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-04 14:19:37 +01:00
Jojii
70646af7a8 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-10-29 09:53:22 +01:00
Andrey Vasnetsov
633d996e61 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-10-25 18:47:03 +02:00
n0x29a
bd93b59c80 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-10-23 15:25:01 +02:00
Tim Visée
3dc809f1e0 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-10-17 13:53:27 +02:00
Jojii
27883dbb41 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-10-14 10:27:00 +02:00
Tim Visée
df1c587c68 Bump dev version to 1.12.1-dev (#5213) 2024-10-10 12:56:28 +02:00
Andrey Vasnetsov
e0d507dac7 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-10-09 10:15:46 +02:00
Ivan Pleshkov
080352cc56 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-07 14:35:17 +02:00
Luis Cossío
045779233a Facets: Support for bool payload (#5100)
* enable faceting with boolean index

* test and fix

* also test uuid
2024-10-01 09:17:50 -03:00
Jojii
8980483416 [Strict mode] Merge StrictMode config types (#5137)
* merge StrictModeConfig and StrictModeConfigDiff into one type

* review remarks
2024-09-26 12:36:39 +02:00
Jojii
791d064bde [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-09-25 14:22:36 +02:00
Tim Visée
e804720551 Bump dev version to 1.11.6-dev (#5122) 2024-09-23 17:38:01 +02:00
Tim Visée
bcd9bfd5ac Bump dev version to 1.11.5-dev (#5099) 2024-09-17 17:06:23 +02:00
Luis Cossío
025f4e3066 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-16 21:27:30 +02:00
Tim Visée
8b0aa6f549 Allow shard transfer from/to the same peer if from/to shard ID is different (#5034) 2024-09-09 09:15:42 +02:00
Andrey Vasnetsov
1712da623b Better json path parsing errors (#5035)
* report malformed json path inside error

* fmt
2024-09-06 14:53:44 +02:00
Arnaud Gourlay
ee6e760b1c Distance matrix docs improvements (#5023)
* docs improvements

* improve openapi description
2024-09-06 08:24:46 +02:00