Commit Graph

28 Commits

Author SHA1 Message Date
Daniel Boros
1cbf297f9e feat/shard-ops-timeout (#7750)
* feat: add shard-ops timeout

* feat: add shard-ops timeout

* feat: add missing timeout

* fix: format

* fix: type serialization

* fix: bad wal flush logic

* feat: add seperate wait_time

* fix: linter issues

* fix: linter

* chore: make select more readable

* fix: linter issues

* chore: remove comment

* chore: adjust comment

* chore: update definition

* chore: remove extra wait_timeout -> make timeout global

* chore: remove wait_timeout from point_ops

* chore: remove wait_timeout from grpc

* refactor: make shard_ops more readable

* chore: remove timeout from update_all

* feat: propagate wait_timeout error

* fix: clippy recommendation

* chore: update wait timeout

* refactor: update merge_successful_update_results

* fix: tests inconsistency

* fix: revert global ord, partialord for UpdateStatus

* fix: integration test

* fix: res ingoring

* fix: review requests

* fix: clippy

* chore: revert back futures unordered

* fix: resolve response status

* force timeout for remote operations

* fix: pr reviews

* fix: switch to duration

* Bump OpenAPI spec

* feat: add serde_as

* fix: timeout statu condition

* Minor tweaks

* Use tokio timeout directly rather than deadline

* Revert schema generator permissions

* Remove obsolete semi-colon

---------

Co-authored-by: generall <andrey@vasnetsov.com>
Co-authored-by: timvisee <tim@visee.me>
2026-01-09 10:24:45 +01:00
Andrey Vasnetsov
e744bd6014 implement custom collection metadata (#7123)
* implement custom collection metadata

* persist metadata change

* Also unset a key in the test

---------

Co-authored-by: timvisee <tim@visee.me>
2025-08-26 11:49:17 +02:00
Kumar Shivendu
34e18eb22c Allow retaining more closed segments (#6976)
* Retain more closed segments

* Add back rocksdb

* Update WalOptions/WalConfig across the code

* Use NonZeroUsize

* Expose via APIs

* Update gRPC docs

* Fix stoarge compat test

* recompile openapi.json with rocksdb

* default wal retain closed fn

* update openapi.json

* Use qdrant/wal latest commit and remove from config.yaml
2025-08-07 13:44:26 +02:00
Jojii
1fded093b7 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-06 15:03:23 +01:00
Tim Visée
3e536347e1 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-02-25 11:21:25 +01:00
xzfc
d90a68137b Add VectorName type alias (#5763)
* Add VectorName/VectorNameBuf type aliases [1/2]

* Add VectorName/VectorNameBuf type aliases [2/2]
2025-01-24 01:29:01 +00:00
Jojii
fd4705c29d Measure payload read IO (#5773)
* Measure read io for payload storage

* Add Hardware Counter to update functions

* Fix tests and benches

* Rename (some) *_measured functions back to original
2025-01-16 14:25:55 +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
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
Roman Titov
7e7348613e Add UUID to collection config (#5378)
* Add UUID to collection...

...and recreate collection, when applying Raft snapshot, if UUID of collection is different

* fixup! Add UUID to collection...

Remove UUID field from gRPC and exclude it from OpenAPI spec 🤡

* fixup! fixup! Add UUID to collection...

Always generate collection UUID 🤦‍♀️

* Raft snapshot recreate collection no expose UUID (#5452)

* separate colleciton config structure from API

* fmt

* Update lib/collection/src/operations/types.rs

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

---------

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

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
Co-authored-by: Tim Visée <tim+github@visee.me>
2024-11-15 19:03:50 +01:00
Jojii
73025ba9d1 Populate hardware counter to REST API (#5308)
* populate hardware counter

* make consume semantic explicit

* Merge pull request #5328

* add hardware info to more endpoints

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-10-29 22:15:37 +01: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
Jojii
e9bad464ff [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 10:49:23 +02:00
Arnaud Gourlay
28c8639fa3 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-06 18:59:23 +02:00
Andrey Vasnetsov
1878713679 Fix multivector for unnamed vectors (#4482)
* minor conversion improvement

* use NamedVectors in update_vectors

* remove merge from VectorStruct

* rename Multi -> Named in vector struct

* add multi-dense vectors option into VectorStruct

* generate openapi

* rename VectorStruct -> VectorStructInternal

* add conversion for anonymous multivec in grpc

* renames for BatchVectorStruct

* implement multi-dense for batch

* allow multi-dense in batch upserts

* test and fixes
2024-06-18 20:38:24 +02:00
Arnaud Gourlay
1cafdacc9e universal-query: add lookups to query API definition (#4479)
* universal-query: add with_lookup to query API definition

* fix consistency doc check

* lookup_from and not lookup_with

* clean import

* improve doc for lookup location wrt using

* Suggestions for descriptions

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2024-06-18 07:54:59 +02:00
Andrey Vasnetsov
44f2744d74 Byte storage api support (#4065)
* wip: include datatype in vector params API

* generate api schemas

* propagate datatype to segment creation

* fix review

* fmt
2024-04-18 15:22:28 +02:00
Ivan Pleshkov
270e884a08 Rest decouple collection record type (#3865)
* rest decouple collection record type

* are you happy clippy

* remove Vector::to_vec_ref
2024-03-19 18:06:19 +01:00
Ivan Pleshkov
c1e32cf462 Use rest vector type as non segment part (#3829)
* use rest vector type as non-segment part

* add todo

* switch into -> from

* review remarks

* review remarks
2024-03-18 13:31:55 +01:00
Luis Cossío
94fe916ebc refactor: turn offset into an option (#3082)
* refactor: make offset optional

* update openapi

* add simple test
2023-11-22 15:05:54 -03:00
Andrey Vasnetsov
9973991958 Huge refactoring to make read requests aware of shard key selector (#3004)
* huge refactoring to make read requests avare of shard key selector

* fix integration test

* review fixes

* allow lookup_from specific shards
2023-11-14 16:47:05 +01:00
Ivan Pleshkov
7f065d4a0a Integrate vector into NamedVectors struct (#2966)
* Integrate vector into NamedVectors struct

* revert into_default_vector

* remove unnecessary functions

* remove unnecessary functions

* remove unneccesary function

* remove unnecessary match

* remove matches

* revert preprocess signature

* remove unnecessary functions
2023-11-11 17:29:49 +01:00
Andrey Vasnetsov
ca4a9b32c0 Remove deprecated search methods (#2970)
* remove duplicated search methods, introduced for compatibility in last version

* Use `with_capacity` rather than a manual reserve

* explicit Arc clones

* get rid of batching by runs of same strategy

* avoid refactor in group by

* more explicit arc clones, remove one .expect()

* little extra refactor on recommendations.rs

* refactor grouping_test.rs too

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2023-11-10 18:38:01 +01:00
Andrey Vasnetsov
c95b2448d9 Shard key routing for update requests (#2909)
* add shard_key into output data structures for points

* fmt

* add shard selector for point update operations

* fix creating index without sharding

* Merge serde attributes

* Code review changes

* review fixes

* upd openapi

---------

Co-authored-by: timvisee <tim@visee.me>
2023-11-09 15:06:02 +01:00
Luis Cossío
4700e2a86a Expose timeout query param for search requests (#2748)
* add timeout query param for search requests

* enable timeout for recommend requests

* Add query timeout for group by requests

* update openapi models

* Don't decrease timeout after recommend preprocessing

* Add openapi test

* code review

* add timeout to individual group by requests, non-decreasing

* handle timeout for discover

* Update timeout field tag in SearchBatchPoints
message
2023-11-02 12:45:46 -04:00
Roman Titov
789992d3f7 Fan out read operations if local shard is updated (#2642)
* Fan-out read operations if local shard is being updated

* Implement `is_update_in_progress` check for all shard types

* fixup! Implement `is_update_in_progress` check for all shard types

Reverse conditional 🤦‍♀️

* WIP: Add `read_fan_out_factor` collection parameter...

...and refactor `execute_read_operation`/`execute_and_resolve_read_operation` to use it reasonably

* WIP: Refactor `info` and `count` requests to utilize `read_fan_out_factor` properly

* fixup! WIP: Refactor `info` and `count` requests to utilize `read_fan_out_factor` properly

Fix typo

* fixup! WIP: Add `read_fan_out_factor` collection parameter...

Initialize `read_fan_out_factor` in tests

* fixup! WIP: Add `read_fan_out_factor` collection parameter...

Add `TODO` marker (:

* fixup! WIP: Add `read_fan_out_factor` collection parameter...

* fixup! fixup! WIP: Add `read_fan_out_factor` collection parameter...

* fixup! fixup! fixup! WIP: Add `read_fan_out_factor` collection parameter...

🤦‍♀️

* Add `read_fan_out_factor` to required HTTP and gRPC APIs

* WIP: Generate OpenAPI spec and gRPC docs

* fixup! Add `read_fan_out_factor` to required HTTP and gRPC APIs

* fixup! WIP: Add `read_fan_out_factor` collection parameter...

Fix the comment

* Add documentation

* fixup! Add documentation

Update OpenAPI spec and gRPC docs

* optional param by default + comment

* fmt

* rollback test fixes

* review changes

* fmt

* revert api changes

* upd openapi

* upd comment

* fix info api

* resolve merge conflicts

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2023-09-22 21:56:10 +02:00
Arnaud Gourlay
c81ab65fbe Remove before_drop mechanism (#2144)
* Remove before_drop mechanism

* name scoped thread for troubleshooting

* Do early return with try

---------

Co-authored-by: timvisee <tim@visee.me>
2023-06-27 10:52:31 +02:00
Arnaud Gourlay
2763ecff0a merge integration binaries (collection) (#2037) 2023-06-07 11:32:00 +02:00