Commit Graph
100 Commits
Author SHA1 Message Date
Jojii f6c3010a97 Metrics incoming and outgoing shard transfers (#7701)
* Metrics incoming and outgoing shard transfers

* clippy

* Revert counting separately
2025-12-18 17:27:19 +01:00
Jojii 4426dd97b3 Metrics cluster working state and last update (#7670)
* cluster working state and last update in metrics

* Rename metric

* Remove error string

* Use timestamp instead

* Fix prometheus help text

* Change metric type to counter
2025-12-18 17:26:37 +01:00
Jojii 625d796bcf Avoid panics on empty metric families (#7479) 2025-12-03 10:23:55 +01:00
Jojii 3a19714f49 Make indexed-only-excluded-points metric default to 0 (#7649)
* Make indexed_only_excluded in metrics default to 0

* Fix tests
2025-12-03 10:23:55 +01:00
Jojiiandtimvisee 0f191bfcf6 Metrics for snapshots (#7497)
* Add atomic counter for running snapshots

* Refactor collection telemetry + export prometheus metric

* Handle collection in ToC + current recovery measurements

* Fix openapi tests

* Fix tests

* Add snapshot metrics for streaming and partial snapshots.

* Fix typo in metrics name

* Adjust metrics names

---------

Co-authored-by: timvisee <tim@visee.me>
2025-11-14 12:31:06 +01:00
Jojii 8ec08c4cd8 Fix panic on empty collections (#7478) 2025-11-14 12:31:03 +01:00
Jojii ed8e9dce76 Add global metrics prefix (#7438)
* Qdrant prefix for metrics

* Update metrics tests

* Update openapi docs

* Make prefix configurable

* don't enable metrics prefix by default

* Adjust tests and openapi specs

* Custom validation for metrics_prefix setting
2025-11-14 12:30:22 +01:00
Jojiiandtimvisee f220845f84 Procfs metrics (#7451)
* Procfs metrics

* Clippy

* Fix compiling on non linux targets

* Move procfs up

---------

Co-authored-by: timvisee <tim@visee.me>
2025-11-14 12:30:16 +01:00
Jojii df2b1c6232 Metrics vectors by name per collection (#7441)
* Add vector count per vector-name to metrics API

* Add to metrics API

* Improve TinyMap::get_or_insert_default and add tests

* Minor improvements

* Update openapi

* Review remarks

* Remove `collection_vectors` since it can be calculated manually
2025-11-14 12:30:15 +01:00
JojiiandTim Visée cc4bff1615 Dead shards in /metrics (#7310)
* Dead shards in /metrics

* Update src/common/metrics.rs

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

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-11-14 12:30:15 +01:00
Jojiiandtimvisee 40acac3c37 Add unindexed vectors to telemetry and metrics API (#7307)
* New metric for excluded vectors in indexed_only requests

* Make metric name align with prometheus naming convention

* Fix nit

* Fix tests

* Fix openapi

* Rename index_only into indexed_only

---------

Co-authored-by: timvisee <tim@visee.me>
2025-11-14 12:30:15 +01:00
Jojii debb913da5 Add num points/vectors to metrics API (#7302) 2025-11-14 12:30:15 +01:00
Jojiiandtimvisee 69d3198248 Add replica metrics (#7301)
* Add replica metrics

* Clippy

* Properly ignore shards with resharding status

* Include 0 as value in metrics

* Remove total_active_replicas and total_expected_replicas

* Improve minimum active replica count in case of resharding

* Reorder metrics calls min < max (to trigger CI)

* Fix metrics help

* Fix typo

---------

Co-authored-by: timvisee <tim@visee.me>
2025-11-14 12:30:15 +01:00
Jojii 30fc847643 Add avx512vl and avx512vpopcntdq in telemetry (#7471) 2025-11-14 12:30:14 +01:00
Jojii 3fd07eb082 Currently running optimizers in Metrics (#7316)
* Currently running optimizer count in metrics

* Clearly state the prerequisites of count_optimizers_running()

* Minor improvements

* improve metric naming
2025-11-14 12:29:36 +01:00
Jojiiandtimvisee b737601a19 Bump segment version on {delete,update,upsert}-by-filter requests (#7157)
* Bump segment versions on *-by-filter operations to acknowledge WAL

* Assert exactly one segment with the new operation version

* Review remarks

* Separate segment version number to not affect partial snapshots

* Adjust unit test

* Remove old bump_segment_version implementations

* Clarify max_persisted_segment_version_overwrite in flush_all

* Move trait implementations - Clippy

* Apply segment bumping to all *-by-filter functions

* Remove AtomicOptionU64

* Update function name and comments

* Remove max condition, start with overwrite value

* Add assertion, can never have zero segments

* Make max_persisted_segment_version_overwrite monotonic with fetch_max

---------

Co-authored-by: timvisee <tim@visee.me>
2025-09-29 11:28:28 +02:00
Jojiiandtimvisee 81c6ab2911 Mirgate from old shard key format on load (#7110)
* Migrate shard-key format

* Reduce visibility of was_old_format attribute

* Add debug message when we migrate persisted shard key format

---------

Co-authored-by: timvisee <tim@visee.me>
2025-08-26 13:18:36 +02:00
Jojii 6ae07f0fd8 Always load InferenceService (#7050)
* Always load InferenceService

* Add BM25 openapi test

* Add warning to development.yaml config (#7051)
2025-08-14 14:30:26 +02:00
Jojii e8907324cb Improve h-sum in dot_avx calculation (#7002)
* Reduce amount of h-sum calculations in dot_avx

* Improve HSUM calculation and apply 4way-hsum to other places
2025-08-14 14:30:25 +02:00
26a496b40e BM25 in the Core (#6891)
* Uncouple tokenizer and TextIndexParams

* Refactor token processing in `TokenizerConfig` (#6912)

* Refactor token processing in TokenizerConfig

* fix max length checking

* [Bm25] Execution implementation (#6939)

* Add Bm25

* Execute BM25 if config available

* cargo format

* Add mocked tests for inference and bm25

* Properly apply InferenceType

* Fix tests

* Review remarks

* Review remarks

* Add overwritten model name fix again

* use enum instead of multiple constants

* ensure handling all fields of InferenceInput in infer_local

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>

* review fixes

* fmt

* spell-check

* deduplicate code

---------

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-08-11 13:16:15 +02:00
Jojii 9ab1fcabc8 Fix config path & Webui Assets in Debian package (#6958)
* Fix debian config location & WebUI assets

* remove config overwrite env variable again
2025-08-11 13:15:52 +02:00
Jojii 3297d36f5f Minor inference code improvements (#6890) 2025-07-24 08:44:44 +02:00
Jojii e3738b38f6 Replace Box with Either (#6887) 2025-07-17 14:33:15 +02:00
JojiiandLuis Cossío b59c188795 [MMR] Optimize SymmetricMatrix (#6813)
* Add DiagonalMatrix for mmr

* Add column OOB checking in debug mode

* Fix Clippy; Reduce allocations in scorers loop

* rename to symmetric matrix

* extra test

* Don't call 'resize' in each iteration

* Clippy

* review nits

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-07-17 13:57:12 +02:00
154fb27377 Store index type in payload index config (#6812)
* Store payload index type in config

* Fix CI

* Use new function

* Review remarks

* Fix Ci

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

* Add is_appendable function to storage type

* Fix storage: store index type in payload index config (#6852)

* Restructure payload index config for backwards compatibility

See: <https://github.com/qdrant/qdrant/pull/6812#issuecomment-3057928785>

* Use mapping of combined schema and type, use storage type for serde

* Replace common functions with defer

* Minor adjustments

* Don't deserialize skip_rocksdb field in payload config if not set

* Rename all payload index types to snake_case format when serializing

* Fix clippy warnings when building without RocksDB

* Change type of FullPayloadIndexType from enum to struct

* Remove both from mutability, assume mutable there

* Also rename the payload index type to snake case

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
2025-07-17 13:56:33 +02:00
Jojii 09cc3c7722 Fix duplicates in hardware counter metrics (#6803)
* Fix duplicates in hardware counter metrics

* Minor cleanup
2025-07-17 13:46:49 +02:00
Jojiiandgenerall 8fa3dd4478 Implement stemming (#6770)
* Implement stemming

* minor fix

* Add openapi specs

* Fix import

* Fix Test, rename API type

* update openapi

* fix rest models

* Review remarks

* Minor code cleanup

* make grpc naming aligned with Rest + use master branch for dependencies

* grpc docs

* use tagged version

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-07-17 13:38:36 +02:00
JojiiandAndrey Vasnetsov a44801b14d Implement new multilingual tokenizer (#6762)
* Implement new multilingual tokenizer

* Remove unnecessary clones

* Codespell

* filter stopwords before stemmer

* Fix Chinese stopwords (#6765)

* Fix Chinese stopwords

* remove todo

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-07-17 13:34:44 +02:00
Jojii 3feecb5970 Add Japanese stopwords (#6683)
* Add Japanese stopwords

* Adjust list to be more close to source & update openapi
2025-07-17 13:27:40 +02:00
edc299b0cb Add new multilingual tokenizer (#6678)
* Add new tokenizer for multilingual

* Make codespell happy

* improve handling of when to apply stemming

* Fix stemming implementation

* Fix Japanese language detection. Add tests for MultilingualV2

* Update lib/segment/src/index/field_index/full_text_index/tokenizers/japanese.rs

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>

* Update lib/segment/src/index/field_index/full_text_index/tokenizers/japanese.rs

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>

* Update lib/segment/src/index/field_index/full_text_index/tokenizers/multilingual.rs

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>

* Make init() private

* move model into segment, filter non-alphanumeric tokens

* fmt

* exclude punctuation from tokenizer result

* fm

---------

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2025-07-17 13:25:31 +02:00
Jojii 07dae94119 Fix broken CI on Dev (RocksDB test) (#6680)
* Attempt to fix CI

* Remove unused imports
2025-07-17 13:07:39 +02:00
Jojii b5fe0e76fb Fix enormous memory usage in Distance Matrix API on high sample size (#6640)
* Fix memory leak in distance API

* Add tests
2025-07-17 11:36:52 +02:00
Jojii de030bae5b Remove option from immutable_inverted_index (#6636) 2025-07-17 11:23:42 +02:00
0d2c1ce254 Make gridstore Advise::Random and add function for sequential read (#6510)
* Make gridstore Advise::Random and add function for sequential read

* Reduce duplicate code in gridstore

* use sequential implementation in iterator

* actually use the sequential read

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-05-22 23:12:43 +02:00
Jojii 41f59d683c HardwareCounterCell::disposable() Performance Improvement (#6511)
* Improve performance of HardwareCounterCell::disposable() by 72x

* Fix ci
2025-05-22 23:03:54 +02:00
Jojii 121b2d543e Fix some wrong vector-read IO measurements (#6365)
* Fix some wrong vector_storage io measurements

* Review remarks
2025-04-21 00:02:45 +02:00
Jojii 4585c3571c Fix measuring in memory inverted index (#6316)
* Fix measuring in memory inverted index

* Reduce overhead of get_token_id

* Remove not used function
2025-04-20 23:51:43 +02:00
Jojii 231d579f70 Don't measure in memory geo, map and numeric indices (#6311) 2025-04-20 23:51:37 +02:00
JojiiandTim Visée dcd5674ebb Writeback counter cell (#6190)
* Add WritebackCounterCell

* Replace custom counting with WritebackCounterCell

* Update lib/common/common/src/counter/counter_cell.rs

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

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-04-20 23:51:26 +02:00
Jojii 07fbe5465b Don't measure in-memory hw for full text indices (#6309)
* Don't measure in-memory full text index

* Clippy

* Fix mmap_postings conditioned counting
2025-04-20 23:51:17 +02:00
Jojii 5117e24758 Only measure HW if on disk for bool index (#6296)
* Only measure HW if on disk for bool index

* Remove missed measurement
2025-04-20 23:51:08 +02:00
Jojii a276ffec1e Add ConditionedCounter (#6295) 2025-04-20 23:49:49 +02:00
Jojii a8c7a034ce Measure Payload IO reads on index creation (#6252) 2025-03-31 16:20:20 +02:00
Jojiiandgenerall 5cd7239b61 Measure Payload Index IO Writes (#6137)
* Prepare measurement of index creation + Remove vector deletion
measurement

* add hw_counter to add_point functions

* Adjust add_point(..) function signatures

* Add new measurement type: payload index IO write

* Measure payload index IO writes

* Some Hw measurement performance improvements

* Review remarks

* Fix measurements in distributed setups

* review fixes

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-03-31 16:19:19 +02:00
5f49aa746f Payload Index Io measurements with Iterator (#6132)
* IteratorExt helper functions for Hw Measurements + Some impls

* More index impls; Performance improvements; Use new iterator

* Add missing measurement in hnsw search. Use disposable flag in HwCounterCell too

* use precomputed counts more

* Review nits

* Fix measurement of map_index iter_values_map

* Review remarks

* fix OnFinalCount

* remove comment

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-03-21 11:45:51 +01:00
Jojiiandgenerall 56a7cfdb20 Cardinality estimation IO measurements (#6117)
* Cardinality estimation measurements

* Apply hw measurements to latest changes from dev

* Clippy

* Also measure cardinality estimation for geo index

* Make measured units 'bytes'

* Use PointOffsetType instead of u32 for size calculation

* fix memory cost for check_values_any in mmap index

* fix double counting for value reading in mmap, remove hw_counter from mmap hashmap

* fmt

* fix hw measurement for text index

* Remove non necessary lifetime annotations

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-03-21 11:44:55 +01:00
Jojii 9554383a1e Payload fulltext index IO read measurements (#5954)
* FullTextIndex filter measurements

* Clippy

* Add test for `new_accumulator`
2025-03-21 11:44:01 +01:00
Jojii 6d53bd9184 IO read measurements for most Payload indices (#5951)
* Add payload index filtering IO measurements for some indices

* Add payload index metric to api and telemetry

* Also account for index access overhead

* Review remarks

* Anonymize new HardwareUsage field

* Fix tests
2025-03-21 11:43:45 +01:00
Jojii 9676f9a2c6 Io measurement cleanup and tests (#5949)
* HW measurement cleanup and more tests

* Fix wrong measurements

* Use new assertion function

* Fix Payload Measurement bug. Fix tests
2025-03-21 11:43:31 +01:00
Jojii a2d7947917 Measure io writes for vector upsertions (#5944)
* Add counter to vector storage API

* Measuring IO write for dense vectors

* Tests, GPU and sparse

* Measure multi vectors too

* Fix comment
2025-03-21 11:42:40 +01:00
JojiiandTim Visée 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
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
Jojii 97743b1b62 Propagate hardware counter for more functions (#5844)
* Propagate hardware counter for more functions

* Minor improvements

* use vector_query_contexts hardware_counter
2025-01-27 18:25:49 +01:00
Jojii c815a1bd43 Implement more IO measurements for PayloadStorage (#5822)
* Finish io measurement for payload storage

* Remove done TODOs

* review remarks

* make signature of `wipe()` consistent

* Remove hardware_counter from tracker.rs and make interfaces consistent

* Add hw_counter to payloads update_storage function from dev
2025-01-23 14:29:39 +01:00
Jojii b0eb8d3431 Io measurement rename functions (#5816)
* replace _measured functions with original name

* Rename more functions
2025-01-23 14:29:32 +01:00
Jojii e5c6caa175 Fix set_by_key not persisted between reload (#5819) 2025-01-23 14:27:49 +01:00
Jojii 38f478ddf7 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-23 14:27:40 +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
Jojii cb8667a7ae Merge pull request #5729
* Consider filter-cardinality as cost in update ratelimiter

* Use OperationEffectArea and improve rate limit error message

* Clippy

* Fix test
2025-01-16 10:49:14 +01:00
Jojii a2ba920a84 [Strict Mode] distributed max collection payload size (#5679)
* Restrict payload size in distributed setup

* Also check overwrite payload API
2025-01-08 14:08:44 +01:00
JojiiandArnaud Gourlay bf4cae8778 [Strict Mode] Max collection size in distributed setup (#5592)
* Strict Mode: distributed checking of max collection size

* add size projections in distributed mode

* Add consensus tests

* New Test: All nodes in cluster

* fix tests

* Update lib/collection/src/collection/mod.rs

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>

* increase upsert delay

* add TODO for resharding

* wait for strict mode config to be applied on second node

* remove delays

* Also wait for strict mode in other test

* clearify strict mode config option

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-01-08 14:08:12 +01:00
Jojiiandgenerall 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
JojiiandArnaud Gourlay 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
Jojii 14b9fbb98a Fix panic when dropping Toc in debug mode and tests (#5504) 2024-12-09 10:51:56 +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
Jojiiandgenerall 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
Jojiiandgenerall 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
Jojiiandgenerall c1d0a8d61e 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-11-08 11:19:41 +01:00
Jojiiandgenerall 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
Jojiiandgenerall cd8efa8f17 Hw counter utilization checks (#5288)
* Enforce usage of hardware counter values

* improve comments

* log a warning in release mode

* some minor improvements

* avoid cloning for hardware counter

* fmt

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-08 11:15:41 +01:00
Jojiiandgenerall 49eba0930f Cpu measurements for dense vector + custom sparse scorer (#5261)
* add measurements for dense vector and custom sparse scorer

* adjust sparse vector scoring cpu measurement

* review suggestions

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-08 11:11:46 +01:00
Jojiiandgenerall 4c9cda4ad8 Add CPU measurement for multivectors (#5241)
* Add CPU measurement for multivectors

* add further test sparse vector search

* make updating vector_query_context consistent

* review fix + take element type into consideration

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-08 11:09:27 +01:00
Jojiiandgenerall dafe172c49 Add HardwareCounterCell + CPU measurement for sparse vector search (#5239)
* Add HardwareCounterCell and counting for sparse plain search

* Add measurement for indexed sparse vector

* add tests for calculations

* move SegmentQueryContent higher in the call stack

* move hardware counters inside the query context

* fix clippy

* Fix applying hardware measurements and add test for this

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-08 11:09:24 +01:00
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
Jojii 9690ba6cb6 Add error handling if vector is missing for point (#5211)
* add error handling for missing vectors

* add integration test

* add call without specifying 'using' parameter
2024-11-08 10:57:54 +01:00
Jojii 246049ed86 Improve docs for new_unchecked_verification_pass (#5181) 2024-10-08 13:16:46 +02:00
Jojii 7830506a1b remove obsolete timeout (#5142) 2024-10-08 13:10:56 +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
Jojiiandtimvisee 9b37e538f4 [Strict mode] Unit tests (#5124)
* add tests for strict mode

* add good example for strict mode test

* Add succes case to test_request_exact

---------

Co-authored-by: timvisee <tim@visee.me>
2024-10-08 13:10:08 +02:00
Jojii 9e1ccf6237 [Strict mode] migrate toc_new -> toc (#5120)
* Replace all remaining calls of toc() with toc_new

* mirgate toc_new -> toc
2024-10-08 13:10:01 +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
Jojii b7c5f73590 [Strict mode] GRPC verification (#5003)
* first grpc implementations

* make usage of 'scroll' more clear

* introduce 'CheckedTocProvider' trait

* implement more grpc types

* more grpc implementations

* rename StrictModeCheckedProvider to StrictModeCheckedTocProvider

* don't use deprecated feature for UncheckedTocProvider
2024-10-08 13:09:49 +02:00
Jojii 50c06177f4 [Strict mode] Finish REST requests (#4990)
* add strict mode to more requests

* add timeout check from request query

* unify timeout checking

* adjust functions not requiring strict mode

* add missing checks

* add Prefetch check for query api

* review remarks
2024-10-08 13:09:45 +02:00
Jojiiandtimvisee 428e09d49b Trigger optimizers when uploading snapshots (#5140)
* Trigger optimizers when uploading snapshots

* Trigger optimizers through new method when optimizer config is updated

* review remarks

* Add comment on why ignoring channel send errors is fine

* Remove obsolete return value omitting

---------

Co-authored-by: timvisee <tim@visee.me>
2024-10-08 13:08:18 +02:00
Jojii 1527119899 [Strict-mode] Request verification implementation (#4944)
* implement verification for more types and improve trait

* implement StrictModeVerification for update requests

* more impls

* rebase

* add strict mode for more requests

* improve checking

* exhaustive match

* review remarks
2024-09-17 15:26:13 +02:00
Jojiiandgenerall 5335e9365e [Strict-mode] Verification check in API (#4935)
* verification check in API

* review remarks

* minor review fixes [skip-ci]

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-09-17 15:25:56 +02:00
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
Jojiiandgenerall 217b87e76c Wrap handler body in helpers::time (#4901)
* wrap handler body in helpers::time

* remove unnecessary async closures

* fix clippy

* remove more async closures

* avoid another async {}

* remove more async {}

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-08-27 01:09:32 +02:00
8802660275 Storage improvement (#4855)
* improve segment updating

* api improvement

* remove unneeded function

* Update lib/collection/src/collection_manager/holders/segment_holder.rs

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

* fix ci

* add test for cow operation

* review: simplify callback

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-08-27 01:06:22 +02:00
Jojiiandgenerall 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
Jojii 882c74dbcf Non blocking vector operations (#4787)
* Non blocking set payload by filter

* Make more payload functions non-blocking

* Non blocking vector operations
2024-08-09 18:16:37 +02:00
Jojii 6b85f1fd7f Merge pull request #4781
* Non blocking set payload by filter

* Make more payload functions non-blocking
2024-08-09 18:16:33 +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 82609c3cdd Fix field index params in api (#4786) 2024-08-09 18:16:17 +02:00
JojiiandAndrey Vasnetsov 3a8c111cb8 Non blocking filtered deletion (#4780)
* Delete by filter in batches

* Use pop()

* attempt 2 of refactoring (#4784)

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2024-08-09 18:16:13 +02:00
Jojii e6bc3af29c fix tenants not getting applied from API (#4763) 2024-08-09 18:15:19 +02:00