Commit Graph

542 Commits

Author SHA1 Message Date
Arnaud Gourlay
af5b5bedd7 Separate StrictModeConfig output structure (#6114)
* Separate StrictModeConfig output structure

* happy regen

* add strict sparse config

* introduce CollectionConfigTelemetry

* upd openapi

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-03-21 11:42:11 +01:00
Jojii
78f0428f3e Measure hardware IO for update operations (#5922)
* Measure update operations hardware IO

* Add support for distributed setups

* also measure update_local

* Add consensus tests for HW metrics of update operations

* add test for upserting without waiting

* Disable HW usage reporting when not waiting for update API

* Review remarks

* Fix resharding collecting hw measurements

* Fix metric type

* New struct HardwareData for better accumulation

* Ensure we always apply CPU multiplier

* Apply suggestions from code review

* Update src/actix/api/update_api.rs

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

* Fix assert_with_upper_bound_error threshold calculation.

* Clarifying why we don't measure shard cleanup

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-03-21 11:42:08 +01:00
xzfc
a17e122557 Anonymize ShardKey in ReplicaSetTelemetry (#6115)
* Anonymize ShardKey in ReplicaSetTelemetry

* Anonymize vector names in CollectionConfigInternal

* no-op: impl HardwareUsage for HardwareUsage (used in HardwareTelemetry)

* no-op: impl Anonymize for OptimizersStatus (used in OptimizerTelemetry and CollectionsAggregatedTelemetry)

* no-op: impl Anonymize for TrackerStatus in (used in TrackerTelemetry)

* no-op: Anonymize VectorParams in VectorsConfig

* no-op: Copy fields explicitly in OperationDurationStatistics

* no-op: `.clone().map(|x| x.anonymize())` -> `.anonymize()`

* no-op: impl Anonymize for ConsensusThreadStatus (used in PeerInfo and ClusterStatusTelemetry)
2025-03-21 11:41:54 +01:00
Luis Cossío
34fe874e77 [score boosting] Only accept finite numbers (#6092)
* return error for non-finite numbers in expression

* no internal default for division by zero

* add tests

* review suggestions
2025-03-21 11:41:33 +01:00
Arnaud Gourlay
820c9e17d1 Remove validation on CollectionInfo response type (#6107) 2025-03-21 11:41:26 +01:00
Andrey Vasnetsov
706b1a3166 IsEmpty/IsNull index (#6088)
* create initial strucutres

* clippy

* start field-query refactoring

* start field-query refactoring (2/N)

* start field-query refactoring (3/N): duplicate is_empty/null condiftions as field condition

* start field-query refactoring (4/N): re-instate is_empty fallback in case new index is not built yet

* filter for is_empty/is_null

* implement add/remove point

* upd schema

* open and create of null-index

* create null-index

* fix test

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

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

* unit test for null-index

* more unit tests

* add openapi tests

* fmt

* fix for integartion tests

* rabbit review fix

* make [null] non-empty

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-03-21 11:41:12 +01:00
Arnaud Gourlay
b5de28db80 Struct deconstruction leftovers (#6071) 2025-03-21 11:40:13 +01:00
Luis Cossío
1a23ebc4b9 [score boosting] openapi test for formula (#6064)
* add formula to internal grpc api

* add openapi test for formula
2025-03-21 11:40:07 +01:00
Luis Cossío
58c23cabe1 add formula to internal grpc api (#6057) 2025-03-21 11:40:04 +01:00
Luis Cossío
9899b6fda7 [score boosting] add more expressions (#6054)
* sqrt, pow, exp, log, ln, abs

* upd openapi and grpc

* handle undefined math as negative infinity
2025-03-21 11:40:00 +01:00
Arnaud Gourlay
8426b52644 Struct deconstruction in conversions (#6066)
* Struct deconstruction in conversions

* payload ops conversions

* inference conversions

* RecordInternal conversion

* shard operation conversions
2025-03-21 11:39:46 +01:00
Arnaud Gourlay
8e665317c0 Struct deconstruction in gRPC conversions (#6062)
* Struct deconstruction in gRPC conversions

* explicit conversion
2025-03-21 11:39:39 +01:00
Tim Visée
8ad2b34265 Bump Rust edition to 2024 (#6042)
* Bump Rust edition to 2024

* gen is a reserved keyword now

* Remove ref mut on references

* Mark extern C as unsafe

* Wrap unsafe function bodies in unsafe block

* Geo hash implements Copy, don't reference but pass by value instead

* Replace secluded self import with parent

* Update execute_cluster_read_operation with new match semantics

* Fix lifetime issue

* Replace map_or with is_none_or

* set_var is unsafe now

* Reformat
2025-03-21 11:38:56 +01:00
Luis Cossío
a6043c5db4 [score boosting] add gRPC structures (#6035)
* add grpc structures

* grpc docs

* make by_zero_default optional
2025-03-21 11:38:19 +01:00
Luis Cossío
88701bdb82 [score boosting] Connect formula to query (#6024)
* finish connecting formula query

* upd openapi
2025-03-21 11:37:59 +01:00
Luis Cossío
7fe99c6f43 [score boosting] create query structures and parse them (#5990)
* create REST, CollectionQuery, and ShardQuery structures. Parse all variables and conditions

* move stuff around, rename segment Expression to ParsedExpression

* rename to MultExpression

* add Div in REST, use unique geo_distance tag

* review fixes

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-03-21 11:37:53 +01:00
Tim Visée
13178a4dc9 Fix mix ups in read/write rate limit settings (#6029) 2025-03-21 11:37:20 +01:00
Arnaud Gourlay
798f14cafb Fix Clippy 1.85 (#6011)
* Fix Clippy 1.85

* fix false positive
2025-03-21 11:36:07 +01:00
Tim Visée
7abc684361 Bump version to 1.13.4 (#5995)
* Bump version to 1.13.4

* Update missed cherry picks
2025-02-17 11:00:26 +01:00
Arnaud Gourlay
cb1f3220df Add strict mode for max points count (#5967)
* Add strict mode for max points count

* clarify estimated nature
2025-02-17 10:20:50 +01:00
Tim Visée
c2faaf90da Bump version to 1.13.3 (#5970)
* Bump version to 1.13.3

* Update missed cherry picks
2025-02-11 15:22:04 +01:00
Kumar Shivendu
dd1fb3798b fix typo (#5960) 2025-02-11 14:41:29 +01:00
Jojii
ec0762a560 Measure IO reads for vectors (#5912) 2025-02-11 14:40:21 +01:00
Jojii
77f65ef95f HwCounter rename IO metrics (#5898)
* Rename io metrics and add vector_io_write

* Chore: Cleanup obsolete TODOs and simplify retrieving HardwareCounterCells (#5899)
2025-02-11 14:37:24 +01:00
Luis Cossío
f110328296 bump and migrate to rand 0.9.0 (#5892)
* bump and migrate to rand 0.9.0

also bump rand_distr to 0.5.0 to match it

* Migrate AVX2 and SSE implementations

* Remove unused thread_rng placeholders

* More random migrations

* Migrate GPU tests

* bump seed

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-02-11 14:36:20 +01:00
Tim Visée
80bfc03aa0 Bump version to 1.13.2 (#5893)
* Bump version to 1.13.2

* Update missed cherry picks
2025-01-28 11:44:22 +01:00
xzfc
e85a9f18b4 Add VectorName type alias (#5763)
* Add VectorName/VectorNameBuf type aliases [1/2]

* Add VectorName/VectorNameBuf type aliases [2/2]
2025-01-27 18:25:41 +01:00
n0x29a
00933d07ae Strict mode sparsevector (#5841)
* Strict mode sparse vectors
* Update gRPC docs
* Use deny_unknown_fields (#5868)

---------

Co-authored-by: n0x29a <n0x29a@example.com>
Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-01-27 18:25:34 +01:00
Tim Visée
a72a5f43e8 Bump version to v1.13.1 (#5864)
* Bump version to 1.13.1

* Update missed cherry picks
2025-01-23 15:22:55 +01:00
xzfc
eaaa31e34d Fix cargo doc warnings (#5854) 2025-01-23 14:29:19 +01:00
Arnaud Gourlay
0140eb83fc Strict mode multivector (#5757)
* strict mode for multivector

* simplify impl

* regen docs
2025-01-23 14:28:01 +01:00
Tim Visée
ffda0b90c8 Bump version to v1.13.0 (#5814)
* Bump version to 1.13

* Update OpenAPI specification

* Update missed cherry picks
2025-01-16 15:06:38 +01:00
Tim Visée
e35914b154 Fix deleted threshold validation in gRPC, should be in range [0.0, 1.0] (#5810) 2025-01-16 10:51:47 +01:00
Tim Visée
b870197a63 Resharding: expose direction in gRPC API (#5794)
* Expose resharding direction in gRPC API

* Trim whitespaces
2025-01-16 10:50:53 +01:00
Jojii
b870f96513 [Strict mode] limits for filter and conditions (#5754)
* Add limits for filter and conditions

* clippy

* Review remarks + nested condition test

* Fix opnapi specs

* Improve error message by giving info about limits and usage
2025-01-16 10:50:36 +01:00
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