Commit Graph

1374 Commits

Author SHA1 Message Date
Luis Cossío
ef5dbdeae6 [full-text index] return earlier in text query parsing (#6264) 2025-05-22 22:46:31 +02:00
Andrey Vasnetsov
ebdb26841e fill ready-list after initial CPU build (#6410) 2025-04-22 10:18:46 +02:00
Tim Visée
a6d57e910a Qdrant 1.14: enable mutable ID tracker by default (#6268)
* Enable mutable ID tracker by default

* Remove now obsolete feature flag for new mutable ID tracker
2025-04-21 00:51:00 +02:00
Kumar Shivendu
83af9cf3ba Improve telemetry logic and test (#6399)
* Improve telemetry logic and test

* Parametrize telemetry test

* Consistency hash peeer ID across telemetry

* clean test

* Use Option in segments telemetry

* updat openapi spec

* Avoid test failure on change in order of params
2025-04-21 00:12:26 +02:00
Andrey Vasnetsov
bbea80e7d4 Telemetry improvements (#6390)
* allow shard states in anonymize telemetry (with hashed peer ids)

* introduce level3 and level4 for telemetry, where level4 = everything, incl. segments info

* upd openapi

* fix tests

* expose vector count & size stats on shard level to avoid reading of segments

* fix spelling

* upd schema

* fix tests

* Use unwrap_or_default

* [#6390] skip serializing shard details in Level2 (#6398)

* skip serializing shard details in Level2

* upd openapi

---------

Co-authored-by: generall <andrey@vasnetsov.com>

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
2025-04-21 00:10:28 +02:00
Tim Visée
e59d395d80 Use ahash for maps/sets holding point IDs, offsets or similar (#6388) 2025-04-21 00:10:22 +02:00
xzfc
1f805b618e Clear disk cache after read (#6396)
* Move clear_disk_cache to memory::fadvise

* Add memory::fadvise::OneshotFile

* Use OneshotFile
2025-04-21 00:08:52 +02:00
Andrey Vasnetsov
a9795f7ce4 faster mmap numeric index (#6381)
* wip: attempt to investigate slow mmap numeric index

* fmt

* Improve performance of ConditionedCounter (#6384)

* Improve Performance of ConditionedCounter

* Remove unneeded hw_counter from signatures

* Clippy

* Fix Clippy II

* Fix Clippy III

* Fix Clippy IV

* Use static string, don't allocate string

* Remove allow dead code attribute

---------

Co-authored-by: Jojii <15957865+JojiiOfficial@users.noreply.github.com>
Co-authored-by: timvisee <tim@visee.me>
2025-04-21 00:07:08 +02:00
Tim Visée
4f6d3b928a Speed up pending changes lookups using ahash (#6385)
* Add bench for mmap_bitslice_buffered_update_wrapper

* Use ahash in buffered mmap/RocksDB types and in payload storage

* Function is used in testing only
2025-04-21 00:06:46 +02:00
Andrey Vasnetsov
2b86a4b020 Fix update wrapper (#6383)
* fix flush routine for persistent wrappers

* fmt

* rollback changes for write-only wrappers

* Use retain to drop flushed items

* Rename function

---------

Co-authored-by: timvisee <tim@visee.me>
2025-04-21 00:05:56 +02:00
dependabot[bot]
699fa59360 build(deps): bump self_cell from 1.1.0 to 1.2.0 (#6380) 2025-04-21 00:03:43 +02:00
dependabot[bot]
32c9faa745 build(deps): bump anyhow from 1.0.97 to 1.0.98 (#6374) 2025-04-21 00:03:38 +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
Luis Cossío
076bcdaa16 refactor QueryEnum::Nearest for using NamedQuery (#6349)
* refactor QueryEnum::Nearest for using NamedQuery

* use explicit `NamedQuery::from`
2025-04-20 23:58:39 +02:00
xzfc
7a1a96e22b Incremental HNSW index building: append-only case (#6325)
* Pass FeatureFlags into VectorIndexBuildArgs

* Incremental HNSW index building: append-only case

* Use debug_assert

* first_few_ids

* Check deleted_point_count

* Drop unused method
2025-04-20 23:55:57 +02:00
xzfc
3d988e66c4 Remove is_stopped from RawScorer (#6305)
* Introduce CancelledError

* Remove is_stopped from RawScorer
2025-04-20 23:55:39 +02:00
Andrey Vasnetsov
6e0ddbafa9 disk cache hygiene (#6323)
* wip: implement explicit populate and clear_cache functions for all components

* fmt

* implement clear and populate for vector storages

* fmt

* implement clear and populate for payload storage

* wip: implement explicit populate and clear_cache functions payload indexes

* implement explicit populate and clear_cache functions payload indexes

* fix clippy on CI

* only compile posix_fadvise on linux

* only compile posix_fadvise on linux

* implement explicit populate and clear_cache functions for quantized vectors

* fmt

* remove post-load prefault

* fix typo

* implement is-on-disk for payload indexes, implement clear on drop for segment, implement clear after segment build

* fmt

* also evict quantized vectors after optimization

* re-use and replace advise_dontneed
2025-04-20 23:54:40 +02:00
dependabot[bot]
f5f2a7e81d build(deps): bump smallvec from 1.14.0 to 1.15.0 (#6340)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-version: 1.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-20 23:54:25 +02:00
xzfc
ab40beb65d Update hnsw_build_asymptotic benchmark (#6299)
* Update hnsw_build_asymptotic benchmark

* Comments and logs
2025-04-20 23:53:09 +02:00
Arnaud Gourlay
ce07c9ae20 Remove unused Issues dependency on Segment (#6331) 2025-04-20 23:53:02 +02:00
Luis Cossío
317f1e0dbe [strict mode | score boosting] Strict mode for formula queries (#6317)
* move problems.rs to collection crate

* change type on datetime_key expression

* extract from expression

* check for unindexed fields in formula

* clippy

* dedup code

* Only implement verification for `CollectionQuery` types (#6319)

* verify CollectionQuery's Prefetch

* remove implementation for REST query

* remove implementation for REST query groups

* add basic openapi test
2025-04-20 23:52:36 +02:00
Arnaud Gourlay
6e2191fcae Document Multivector Euclidean scoring discrepancy (#6320) 2025-04-20 23:52:28 +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
Jojii
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
xzfc
ee7b764429 Use MaybeUninit in vector storages and query scorers (#6303) 2025-04-20 23:50:11 +02:00
Luis Cossío
e114801ebf sum_scores recommendation strategy (#6256)
* Add in rest and grpc

* add to QueryEnum

* implement Query trait

* connect to scorer creation

* upd tests

* additional changes

* fmt

* gen openapi and grpc docs

* coderabbit fix

* add changes in async scorer

* test sum_scores in more places, refactor to remove repetition
2025-04-20 23:47:58 +02:00
Luis Cossío
8084f4cac1 [score boosting] support datetime expressions (#6196)
* use f64 as internal expression score

* allow datetime as expression

* add test cases

* fix schema, generate openapi and grpc docs

* fmt

* clippy

* fix test precision

* graceful handling of too large numbers, more tests

* rename to DatetimeExpression for consistency

* use datetime's timestamp as seconds

* capture variable name when parsing

* homogenize DateTime into Datetime

* use interface distinction between datetime strings and payload keys

* fix rebase

* fix after rebase
2025-04-20 23:47:20 +02:00
Roman Titov
90340a098c Implement partial snapshot recovery (#6206)
- Fix creating partial snapshot without RocksDB backup
- Fix `segment_manifest.json` file placement
- Implement partial snapshot recovery
- Allow restoring partial snapshot for all shard types
- Validate segment manifests when recovering partial snapshot
- Log error, if streaming shard/partial snapshot failed
- Contextualize errors in `snapshot_files` function
- Tweak log messages in `Segment::take_snapshot` method
- Remove unnecessary lifetimes from `SegmentHolder` iter methods
2025-04-20 23:46:47 +02:00
Arnaud Gourlay
89667860dd Minor cleanups (#6291) 2025-04-20 23:42:17 +02:00
Arnaud Gourlay
33e7aa0b98 Fixes for Clippy 1.86 (#6290) 2025-04-20 23:42:07 +02:00
dependabot[bot]
58813a33e3 build(deps): bump geo from 0.29.3 to 0.30.0 (#6286) 2025-04-20 23:42:00 +02:00
Luis Cossío
17bcc79334 [query] Optimize fetching payloads/vectors at local shard (#6279)
* introduce `RootPlan`

* handle changes at local shard
2025-03-31 20:51:34 +02:00
Andrey Vasnetsov
2baa8cda53 implement missing validation for sparse and milti-vectors in grpc (#6274) 2025-03-31 16:21:25 +02:00
Tim Visée
c232595afb Mutable ID tracker: improve version flushing, grow file in one shot (#6267)
* In mutable ID tracker, grow versions file in one shot

* Fix typos
2025-03-31 16:21:21 +02:00
Andrey Vasnetsov
b5d5dd1579 add DimWeight mult (#6263) 2025-03-31 16:21:00 +02:00
Luis Cossío
6e4a0ad227 [order_by] Deprecate using order_value from payload, dedup by (order_value, id) tuple (#6233)
* deprecate inserting order_value in payload, use the one in the struct instead

* fix for test

* dedup by (order_value, id) tuple

* Scroll dedup test must also consider order value

* Update assert message, include order value

---------

Co-authored-by: timvisee <tim@visee.me>
2025-03-31 16:20:56 +02:00
Roman Titov
f9cc4e06f4 Merge take_snapshot and take_partial_snapshot methods (#6232) 2025-03-31 16:20:45 +02:00
Jojii
a8c7a034ce Measure Payload IO reads on index creation (#6252) 2025-03-31 16:20:20 +02:00
dependabot[bot]
e434382d43 build(deps): bump charabia from 0.9.2 to 0.9.3 (#6237)
Bumps [charabia](https://github.com/meilisearch/charabia) from 0.9.2 to 0.9.3.
- [Release notes](https://github.com/meilisearch/charabia/releases)
- [Commits](https://github.com/meilisearch/charabia/compare/v0.9.2...v0.9.3)

---
updated-dependencies:
- dependency-name: charabia
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-31 16:19:58 +02:00
dependabot[bot]
f230629fa0 build(deps): bump log from 0.4.26 to 0.4.27 (#6247)
* build(deps): bump log from 0.4.26 to 0.4.27

Bumps [log](https://github.com/rust-lang/log) from 0.4.26 to 0.4.27.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.26...0.4.27)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* put variables inside the strings for log macros

* also for pyroscope

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-03-31 16:19:55 +02:00
Jojii
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
Andrey Vasnetsov
ad4743a85f vector-io-read measurement on query (#6197)
* remove mut getters from HardwareCounterCell, as mutability is not useful

* introduce vector-io multiplier

* remove RealCpuMeasurement structure

* set vector-io reads multipliers

* account vector reads in dense scorers

* fmt

* fix tests

* propagate hw_counter into posting list iterator

* fmt

* fix test

* wip: measure of sparse iterator

* fmt

* optimize skip_to

* minor refactoring

* keep current PointOffset in iterator to prevent unnecessary reads from memory

* adjust sparse search cpu cost - account for datatype

* fix test

* refactor search_context tests

* move tests into a module

* introduce more tests

* grammar

* review fixes

* fix clippy

* fix clippy again

* change disposable -> new
2025-03-31 16:19:02 +02:00
Tim Visée
126d4f839a Add feature flag to skip RocksDB in immutable payload indices (#6226) 2025-03-31 16:18:02 +02:00
Roman Titov
c5bbcf8a9d Extend partial segment snapshot to support ProxySegments (#5978)
* Add `SegmentManifest::segment_id` field

* Tweak `SegmentEntry::take_partial_snapshot` to support `ProxySegment`

* Track segments added into partial snapshot archive

* Debug assert that segment IDs are a valid UUID

---------

Co-authored-by: timvisee <tim@visee.me>
2025-03-21 12:00:43 +01:00
Andrey Vasnetsov
7726126e5b (Potentially) Fix missing CF on flush on payload index change (#6214)
* Handle missing CF on the payload index flush level

* move error handling on the payload field level, so other fields are not skipped if one fails to flush

* Merge nested match statement

---------

Co-authored-by: timvisee <tim@visee.me>
2025-03-21 11:47:07 +01:00
Kumar Shivendu
c9b48bccd1 Snapshot logging improve (#6192)
* Add details to snapshot logging for more details

* Format code and improve log msg

* Remove unused import and improve logs

* Improve terminology for logging

* Minimize noise using logging levels

* Log when moving local shard

* Apply suggestions from code review

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>

* fmt fix

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2025-03-21 11:46:55 +01:00
Roman Titov
03dc95c74c Check use_mutable_id_tracker_without_rocksdb feature flag when building new segment (#6211) 2025-03-21 11:46:51 +01:00