* 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>
* 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>
* 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