Commit Graph

33 Commits

Author SHA1 Message Date
Tim Visée
b067a7b3f8 Minor Gridstore improvements (#7415)
* Explicitly use C memory representation for Gridstore value pointers

* Inline pure function

* Grow tracker file to be next multiple of two

* In debug builds, panic if getting out of bound point from Gridstore

* Also represent region gaps as C struct

* Remove debug assertion

* Adjust file size test
2025-10-17 13:59:03 +02:00
Tim Visée
da5e5cd42d In Gridstore, also populate the tracker file (#7385) 2025-10-10 13:15:11 -03:00
xzfc
a0d62330c7 Use fs-err (#7319) 2025-09-29 12:47:10 +00:00
Arnaud Gourlay
360d7bc26d Clippy 1.90 (#7253)
* Fix Clippy 1.90

* fmt
2025-09-15 20:12:11 +02:00
xzfc
febf72a47e Generic AccessPattern (#7166) 2025-09-01 11:16:20 +00:00
Luis Cossío
bd448eb580 make Gridstore::iter iterate by owned values (#7045) 2025-08-14 10:54:39 +02:00
xzfc
a959e8a671 MADV_POPULATE_READ on sequential mmaps (#6923) 2025-07-22 14:05:07 +02:00
Luis Cossío
dd63603e98 use seq mmap in iter (#6750)
Also refactor to use const generics
2025-06-24 12:56:30 +02:00
dependabot[bot]
aadb0bd7e6 build(deps): bump lz4_flex from 0.11.4 to 0.11.5 (#6746) 2025-06-23 21:52:09 +00:00
Luis Cossío
be6e425a75 [gridstore] update a selection instead of a range of regions (#6713)
* update a selection instead of a range of regions

* extend instead of loop

* use div_ceil to calculate region_id range
2025-06-23 15:23:54 -04:00
dependabot[bot]
3a6c2ec412 build(deps): bump lz4_flex from 0.11.3 to 0.11.4 (#6702) 2025-06-17 01:47:15 +00:00
Roman Titov
bb150a8023 Implement immutable_files method for segment sub-structures (#6637) 2025-06-16 17:32:36 +02:00
Luis Cossío
17040ecaa1 flush before dropping in ignored test (#6688) 2025-06-16 16:00:16 +02:00
Tim Visée
e47a8753db Add mutable geo payload index on top of Gridstore (#6644)
* Add Gridstore backend for mutable geo payload index

* Add mutable geo payload index builder for Gridstore

* Add tests

* Define type for raw geo point

* Rework geo point loading in Gridstore, load per point ID

* Bump Gridstore options

* Fix panic when storing empty list of geo points in Gridstore

* Review remarks
2025-06-06 12:59:19 +02:00
Tim Visée
a328f3dd49 Add mutable full text payload index on top of Gridstore (#6639)
* Implement clear cache for immutable text index

* Add Gridstore backend for mutable full text payload index

* Add mutable full text payload index builder for Gridstore

* Fix compilation error

* Add tests

* Extract mutable inverted index builder to standalone type

* Return generic error in Gridstore iterator

* Remove intermediate buffer from Gridstore load, load index directly

* Minor fixes

* Remove TODO, no good solution

* Fix review remarks
2025-06-05 12:52:58 -04:00
Tim Visée
4d71f063b9 Add mutable map payload index on top of Gridstore (#6634)
* Serialize vector of ecow strings using cbor

* Adjust trait bounds for Gridstore support in map index

* Add Gridstore backend to mutable map index

* Add Gridstore builder

* Enable new map index in index selector

* Add tests

* Use different Gridstore block size depending on map data type

* Fix review remarks
2025-06-05 09:53:58 +02:00
Tim Visée
fe49cd89e3 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-06-05 09:10:56 +02:00
Tim Visée
845d03b4c8 Improve Gridstore wipe/clear functionality (#6614)
* Gridstore config can be Copy

* Add test asserting wipe behavior

* Add clear function to Gridstore

* Make wipe take ownership, use new clear function everywhere

* Add comment to emphasize wipe behavior

* Propagate errors
2025-06-02 13:18:02 +02:00
Arnaud Gourlay
e86ab89665 Update Criterion 0.6 (#6570) 2025-05-21 13:52:12 +02:00
Arnaud Gourlay
80987ec914 Fix compilation of bench (#6562) 2025-05-20 19:26:58 +02:00
Jojii
37a586726e 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-14 15:09:37 +02:00
Tim Visée
833f310c3d Buffer all file IO when used as reader or writer (#6513) 2025-05-09 15:48:50 +02:00
Arnaud Gourlay
39b3bbc2c6 Fix CI clippy lint for flush_bench (#6470) 2025-04-30 10:13:49 +02:00
Luis Cossío
1864e79833 [minor opt] update region gaps in batch when flushing (#6446)
* update region gaps in batch when flushing

* rename to relative -> local

* add flushing bench
2025-04-29 16:22:50 -04:00
Luis Cossío
6be0c62bb0 Reuse space more in gridstore (#6445) 2025-04-25 18:03:36 -04:00
xzfc
9fedc65bc4 Clear disk cache after read (#6396)
* Move clear_disk_cache to memory::fadvise

* Add memory::fadvise::OneshotFile

* Use OneshotFile
2025-04-17 10:57:47 +02:00
Tim Visée
10ef9eef72 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-15 14:06:23 +02:00
Andrey Vasnetsov
0266508736 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-09 10:54:30 +02:00
Arnaud Gourlay
e77af48078 Fixes for Clippy 1.86 (#6290) 2025-04-01 12:26:37 +02:00
Jojii
abbb56f651 Measure Payload IO reads on index creation (#6252) 2025-03-25 17:38:36 +01:00
Jojii
c9a6a96bcb 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-12 09:59:43 +01:00
Tim Visée
3e536347e1 Bump Rust edition to 2024 (#6042)
* Bump Rust edition to 2024

* gen is a reserved keyword now

* Remove ref mut on references

* Mark extern C as unsafe

* Wrap unsafe function bodies in unsafe block

* Geo hash implements Copy, don't reference but pass by value instead

* Replace secluded self import with parent

* Update execute_cluster_read_operation with new match semantics

* Fix lifetime issue

* Replace map_or with is_none_or

* set_var is unsafe now

* Reformat
2025-02-25 11:21:25 +01:00
Luis Cossío
5d9d5bd3f9 Rename blob_store as gridstore (#5918)
* rename blob_store into gridstore

Article is incoming and I feel like gridstore is a better fit to the
architecture

* fmt

* remove outdated TODO
2025-01-30 14:56:34 -03:00