* fix segment repair on load
* workaround for rocksdb
* Minor comment tweaks
* In in memory ID tracker, unset version first before dropping mapping
* rename cleanup_versions into fix inconsistencies
---------
Co-authored-by: timvisee <tim@visee.me>
* wip: generalization trait for queries
* implement generalization for point operations
* fmt
* log priority queue
* wip: SlowRequestsListener
* fmt
* fix clippy
* simplify generalization
* fmt
* implement collection of requests profiles for update API
* implement API for viewing slow requests log
* add collection name to update worker
* add datetime to log
* fmt
* probabilistic counter of unique requests
* rename
* compute hash before converting into json value
* move logable out of generalizable
* fmt
* log query request
* fmt
* some fixes
* move measurement into local shard
* fmt
* upd openapi (not important)
* For enum variants, has discriminant
* Make SearchParams Copy
* Hash 0.0 and -0.0 the same
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Correctly hash enum variants and float values
* Hash through ordered float instead
* Fix priority queue not keeping longest request for hash
* SearchParams implements Copy
* Fix clippy warning
* Add unordered_hash_unique
* skip serialization if none
* Use OrderedFloat for hashing a float
* Use OrderedFloat for hashing a float
* only log updates if they are performed
---------
Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: xzfc <xzfcpw@gmail.com>
* Create and load for an appendable quantization
remove feature flag
more todo
review remarks
review remarks
* fix after rebase
* Enable BQ in appendable segments
* remove const placeholder
* fix after rebase
* fix after rebase
* fix config mismatch optimizer
* fix sq infinity loop
* add comment
* fix flaky save_on_disk tests with barrier synchronization
* apply suggestions from coderabbitai bot
* fix timeout in test_wait_for_multiple_notifications
* add TEST_IO_SLACK for disk write latency in tests
* make concurrent readers count explicit in test
* relax timing assertions and use timeout variable for consistency
* refactor wait_for to use deadline-based loop to prevent false timeouts
* fix stale variable name in comment
* relax immediate test timing bound to reduce CI flakes
* add overflow protection for deadline calculation
* apply "checked_sub here and unwrap" suggestion
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* track remaining time instead of deadline to avoid overflow issues
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add common::typelevel module
* Use common::typelevel for score_bytes
* Revert "Split FilteredScorer into FilteredScorer and FilteredQuantizedScorer"
This reverts commit ff3a93ee95.
* FilteredQuantizedScorer
* Extract `struct Filters` from `FilteredScorer` and `FilteredQuantizedScorer`
* Revert "QuantizedVectors::query_scorer_bytes"
This reverts commit 9dee824afd.
* Partial revert "Add QueryScorerBytes::score_bytes"
This reverts commit d80af4f698, but keeps
the QueryScorerBytes trait while removing implementations.
* Partial revert "Add EncodedVectorsBytes::score_point_vs_bytes"
This partially reverts commit c741e42f9a.
- trait `EncodedVectorsBytes` and its implementations: reverted/removed
- calls to `EncodedVectorsBytes::score_point_vs_bytes`: replaced with
calls to `EncodedVectors::score_bytes`
* Remove unused method FilteredScorer::new_from_raw
* 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
* 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>
* 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
* 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
* 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
* Add function for validating legacy collection names
* Apply legacy collection name validation everywhere
* Add more validation to gRPC endpoints
* Adjust tests
* 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>
* 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
* 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
* 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>
* 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
* 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>