Commit Graph
314 Commits
Author SHA1 Message Date
Roman Titov 990eee11b4 Refactor Collection::restore_shard_snapshot (#6988) 2025-08-11 13:17:22 +02:00
Arnaud Gourlay 118ff6dda3 Fix Clippy 1.89 (#6981) 2025-08-11 13:16:42 +02:00
xzfc b79757d072 Introduce StableHash (#6940)
* Introduce StableHash

* Use SipHasher24 explicitly
2025-08-11 13:15:14 +02:00
Andrey Vasnetsov af7ab5b192 bump version to v1.15.1 (#6934) 2025-07-24 09:34:36 +02:00
Andrey Vasnetsov 6c9e12f948 UUID index bug (#6916)
* reproduce bug as unit test

* reproduce in even faster unit test

* fix alignment in mmap_hashmap

* clippy

* review fixes
2025-07-24 08:46:26 +02:00
xzfc 916d84a2aa MADV_POPULATE_READ on sequential mmaps (#6923) 2025-07-24 08:46:18 +02:00
Tim Visée f53f8cbfc3 Fix checkfs in MUSL builds (#6903) 2025-07-24 08:44:51 +02:00
Tim Visée 137b6c1e4a Bump version to 1.15.0 (#6896)
* Bump version to 1.15.0

* Update missed cherry picks

* Update redoc to 1.15.0
2025-07-18 11:06:11 +02:00
Arnaud Gourlay 0dd3d8fccb Bump thread-priority 2.1.0 (#6885) 2025-07-17 14:02:06 +02:00
Tim Visée b110600233 Adjust feature flag descriptions (#6875) 2025-07-17 14:00:36 +02:00
Tim Visée 3b7616808c Enable migration from RocksDB to mutable ID tracker by default (#6872)
* Enable migration from RocksDB to mutable ID tracker by default

We planned to enable this by default in the Qdrant 1.15.0 release.

* Synchronize enable at version TODOs for other flags with planning

* Update OpenAPI spec
2025-07-17 14:00:30 +02:00
Tim Viséeandjojii b53f668f52 Naive migration of payload indices from RocksDB to Gridstore (#6810)
* Add function to detect if storage is using RocksDB

* Add feature flag to toggle payload index migration

* Add naive payload index migration, rebuild from scratch if RocksDB

* Adjust payload index rebuild logs

* When rebuilding payload indices, clean up existing storages

* Update OpenAPI spec

* Use weak references to Gridstore in mutable payload index flushers

* Rework payload index clear/wipe functions, make them consistent

* Naively migrate RocksDB before loading indices

* Fix mmap payload index load, staged like others (#6837)

* Add staged loading of mmap numeric payload index

* Add staged loading of mmap map payload index

* Add staged loading of mmap geo payload index

* Add staged loading of mmap full text payload index

* Add staged loading of mmap bool and null payload index

* Minor tweaks

* Don't fail clearing file cache if file does not exist

---------

Co-authored-by: jojii <jojii@gmx.net>
2025-07-17 13:58:04 +02:00
Andrey Vasnetsov 679b53a776 add flag to break optimization loop on panic (#6787)
* WIP: add flag to break optimization loop on panic

* notification on manual budget change only

* move check for disk size before creting a temp segment
2025-07-17 13:47:20 +02:00
Andrey VasnetsovandArnaud Gourlay b858cc54b3 Optimize detect when primary condition is sufficient review (#6794)
* Optimize payload filtering to avoid redundant matching

* No boxing

* review suggestions

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-07-17 13:43:46 +02:00
Tim Visée 50c43a35da Actively migrate payload storage from RocksDB to Gridstore (#6734)
* Migrate RocksDB based payload storage into Gridstore

* Add migrate_rocksdb_payload_storage feature flag

* Minor tweaks

* Use iter to migrate all payloads

* Fix clippy warning

* Update OpenAPI spec

* Track if mmap payload storage is populated, set memory/disk storage type

* Add test

* Log amount of bytes we migrate instead of point count

* Remove TODO

* Render storage size migrated in human human readable format, not bytes

* On migration failure, drop full payload storage directory

* Fix missing import
2025-07-17 13:36:07 +02:00
Tim Visée e8f3a282bf Add in-memory payload storage on Gridstore (#6722)
* Add in-ram-mmap payload storage type

* When RocksDB is not compiled, select in-ram mmap payload storage

* Enable payload storage on-disk check again in config mismatch optimizer

* Add feature flag to build in-ram-mmap payload storage

* Tweak is_on_disk condition

* Bump version estimates in runtime feature flags
2025-07-17 13:27:33 +02:00
xzfc 231567c31a Configurable HNSW healing threshold (#6756) 2025-07-17 13:26:25 +02:00
Tim Visée 44be97644f Add validation for legacy collection names (#6752)
* Add function for validating legacy collection names

* Apply legacy collection name validation everywhere

* Add more validation to gRPC endpoints

* Adjust tests
2025-07-17 13:24:51 +02:00
20e58d50e9 check filesystem on start (#6682)
* check filesystem on start and do some simple mmap test to make sure it is persisted

* fmt

* fix fs type read on non-linux

* feature-flag for fs-check supported platforms + fs check with sub-folder

* fmt

* try larger magic file

* minor fixes

* fix compile on windows

* Add FAT, exFAT and APFS file systems

* Update lib/common/memory/src/checkfs.rs

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

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
2025-07-17 13:10:15 +02:00
Tim Visée abe23b7dd9 Expose runtime feature flags in telemetry (#6667)
* Expose runtime feature flags in telemetry

* Update OpenAPI spec
2025-07-17 13:06:05 +02:00
dependabot[bot] f85f67b07f build(deps): bump flate2 from 1.1.1 to 1.1.2 (#6659) 2025-07-17 13:04:58 +02:00
Tim Visée c6d2379074 Migrate away from RocksDB based sparse vector storage (#6607)
* Reformat

* Add function to find appendable sparse storage files without opening it

* Actively migrate away from RocksDB based sparse vector storage

* Add test for simple sparse vector storage migration

* Fix test comments

* Also migrate vector deletes for sparse storage

* Use walkdir to list files
2025-07-17 13:02:38 +02:00
Tim Visée 5cc77051af Migrate away from RocksDB based multi dense vector storage (#6604)
* Add function to open all multi dense vector storage types

* Move list files function into common crate

* Add function to find appendable multi dense storage files without opening it

* Actively migrate away from RocksDB based multi dense vector storage

* Add test for simple multi dense vector storage migration

* Also migrate vector deletes for multi dense storage
2025-07-17 13:01:53 +02:00
3fc861976d Add mutable numeric payload index on top of Gridstore (#6609)
* Extend Gridstore blob trait, support basic primitives and vector of them

* Implement mutable numeric index on top of Gridstore

* Wrap Gridstore in rwlock, flush asynchronously

* Set custom Gridstore options tuned to numeric index

* Fix compilation errors

* Destruct RocksDB selector everywhere

* Add Gridstore payload index selector, build numeric, fallback others

* Add feature flag to Gridstore mutable payload index

* Don't store empty values in gridstore, it's not supported

* Reformat

* Initialize Gridstore during init of index builder

* Use owned and referenced paths correctly around Gridstore

* Change Gridstore page size in numeric index as suggested

* Make Gridstore block size dependent on size of numeric type

* Add tests

* Add separate fixed size blob trait for vec, prevent footgun

* Improve page size calculation

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

* Simplify Blob requirement for numeric payload index

* Add missing test cases

* Replace ref mut with &mut

* Use correct hardware counter

* Implement clear cache for numeric payload index on Gridstore

* The block size is dynamic

* Error if trying to load index from storage that doesn't match backend

* fix counter

* Add comment on why we change page size

---------

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-07-17 11:36:11 +02:00
Tim Visée d9a36cdd0a Migrate away from RocksDB based dense vector storage (#6603)
* Add function to open all appendable dense vector storage types

* Add function to find appendable dense storage files without opening it

* Add function to migrate RocksDB dense vector storage into mmap

* Add feature flag and actively migrate on load

* Log number of migrated points

* Add function to open all simple dense vector storage types

* Add test for simple dense vector storage migration

* Use correct column families

* Use more generic feature flag

* Also migrate vector deletes

* Fix review remarks
2025-07-17 11:23:24 +02:00
dependabot[bot] dbea70895e build(deps): bump num_cpus from 1.16.0 to 1.17.0 (#6630)
Bumps [num_cpus](https://github.com/seanmonstar/num_cpus) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/seanmonstar/num_cpus/releases)
- [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: num_cpus
  dependency-version: 1.17.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-07-17 11:13:12 +02:00
Tim Viséeandgenerall d09682886a Actively migrate away from RocksDB based ID tracker (#6579)
* Actively migrate RocksDB ID tracker to new format on segment load

* Extract ID tracker migration logic to function

* Feature flag ID tracker migration

* Simplify ID tracker migration by moving it deeper into load function

* Move migrate function to the bottom

* Add test to assert RocksDB to mutable ID tracker migration

* Assert new mutable ID tracker is empty

* Review remarks

* On RocksDB to mutable ID tracker migration failure, clean up files

* Demote empty mutable ID tracker to debug assertion

* Copy all point versions, including deleted, set known mappings

* read links and versions separatelly

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-07-17 11:04:38 +02:00
Andrey Vasnetsovandtimvisee 530430fac2 Bump version to v1.14.1 (#6584)
* bump v1.14.1

* Update missed cherry picks

---------

Co-authored-by: timvisee <tim@visee.me>
2025-05-23 12:02:04 +02:00
Tim Visée cf3d8b99a6 Enable payload_index_skip_rocksdb flag by default (#6587) 2025-05-23 10:18:28 +02:00
xzfcandgenerall 08b343e0ab HNSW healing (#6543)
* Let SearchContext::new create empty context

* FixedLengthPriorityQueue: add `is_full()`

* Implement HNSW healing

* Apply review suggestions

* review comments and docstrcigs

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-05-22 23:18:32 +02:00
Arnaud Gourlay 570597ee32 Fix Clippy 1.87 bis (#6518) 2025-05-22 23:10:13 +02:00
Tim Visée 6bf59ed6eb Use more write buffers, and flush them (#6514)
* Explicitly flush buffered writers so that we catch errors

* Buffer IO in more places

* Tweaks

* Apply review suggestions
2025-05-22 23:10:07 +02:00
Arnaud Gourlay 749b2a3a0f Clippy 1.87 autofix (#6516)
* Clippy 1.87 autofix

* fmt
2025-05-22 23:09:57 +02:00
Roman Titov c0bff6e5b1 Simplify tar_ext module (#5873)
- Replace `WriteSeekBox*` with `SeekWrapper`
- Fix paste-bugs in tests
2025-05-22 23:09:10 +02:00
Tim Visée a70a140067 Use same min IO permits logic as for CPU, prevent asymmetric utilization (#6502) 2025-05-22 23:04:07 +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
Tim ViséeandLuis Cossío 5774255345 Add in-memory payload indices on mmap storage (numeric, map) (#6444)
* Add RAM wrapper to mmap numeric index

* Add RAM wrapper to mmap map index

* Fix test compilation

* Merge RAM wrappers into existing immutable indices

Do this to minimize code duplication since the majority of the code is
exactly the same.

* Minor tweaks

* Remove unnecessary pub visibility, remove unused assertion

* Test immutable numeric index on mmap

* In numeric index test, remove some points

* Add map index test

* Restructure index opening and loading, make it consistent

* don't pre-collect intermediate mapping

* review nits

* Make init unreachable for immutable and mmap, clear must consume index

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-05-22 23:01:25 +02:00
Tim Visée 0699dd0827 Don't batch queries if having more segments than search threads (#6478)
* Don't batch query if there's more segments than CPUs, limit threads

* Don't batch query if there's more segments than search threads

* Link to pull request

* Add note that we only consider local segments and global search threads
2025-05-22 23:00:01 +02:00
Arnaud Gourlay c1369dc41e Fix flaky test rate limiter (#6476) 2025-05-22 22:56:16 +02:00
xzfc ce1adf4026 Move filtering logic from RawScorer to FilteredScorer (#6245) 2025-05-22 22:49:19 +02:00
Andrey Vasnetsov 9eab25fc75 bump v1.14.0 (#6404) 2025-04-21 12:17:44 +02:00
Tim Visée ebab363257 Qdrant 1.14: enable new shard key format by default (#6270)
* Enable the new shard key format by default now

* Remove now obsolete feature flag
2025-04-21 00:53:01 +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
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
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
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
xzfc feb06c9113 Enable incremental_hnsw_building default (#6355) 2025-04-21 00:02:36 +02:00