Commit Graph
950 Commits
Author SHA1 Message Date
Tim Visée e1a4968d5c Enable mmap storage using blob store for sparse vectors by default (#5784) 2025-01-13 14:46:55 +01:00
Arnaud Gourlay 821afded47 Update rocksdb 0.23.0 (#5765)
* Update Rocksdb 0.23.0

* make it work
2025-01-10 11:48:06 +01:00
Ivan Pleshkov 88f68d95b5 Fix gpu sorting bug for low-end devices (#5756) 2025-01-08 10:58:47 +01:00
Andrey VasnetsovandArnaud Gourlay b5edc9066b use 64-bit dim-id for storing sparse vectors (#5687)
* use 64-bit dim-id for storing sparse vectors

* allow to disable compression in blob storage

* use bitpack compression instead of lz4

* add basic bench for mmap sparse vector storage

* misc

* bump storage compat pre-release

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-01-07 21:45:09 +01:00
xzfcandgenerall 786a316cec Separate file for compressed links; variant 2 (#5749)
* fix load of the graph links mmap

* decide compression based on filename rather than bit hacking

* fix test

* fix conversion: always create a new file for compressed links

* fix conversion: adjust compressed flag after conversion

* fix test (again)

* Fixes

* let GraphLayers manage its own files

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-01-07 13:17:20 +00:00
xzfc 85983cfaac Fix unaligned reads for graph links offsets (#5738) 2025-01-06 19:30:12 +00:00
xzfc a3fe4bc1bc Compress offsets in links.bin (#5700)
* Add common::bitpacking_ordered

* Offset compression
2024-12-30 11:15:44 +00:00
xzfc 694ec10f3d GraphLinks: replace trait with enum (#5651)
* GraphLinks: replace trait with enum

* Vec::with_capacity
2024-12-23 18:59:53 +00:00
JojiiandArnaud Gourlay 97da5a2942 [Strict Mode] Max collection size in distributed setup (#5592)
* Strict Mode: distributed checking of max collection size

* add size projections in distributed mode

* Add consensus tests

* New Test: All nodes in cluster

* fix tests

* Update lib/collection/src/collection/mod.rs

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>

* increase upsert delay

* add TODO for resharding

* wait for strict mode config to be applied on second node

* remove delays

* Also wait for strict mode in other test

* clearify strict mode config option

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2024-12-19 16:38:30 +01:00
xzfc 6d9c412c8c Update hnsw_search_graph benchmark (#5666) 2024-12-18 21:02:27 +00:00
Luis Cossíoandgenerall 6e1245c414 Fast loading of mmap sparse storage (#5533)
* use mmap bitslice and a metadata file to avoid loading

* fix and test reported files

* add new files to flusher

* update rocksdb+blob_store compatibility test

* switch to DynamicMmapFlags

* fix setting deleted to `false` on short bitslice

* remove `MmapBitSlice::extend`

* add some more tests to mmap sparse vector storage

* calculate deleted_count and next_point_offset on load

* get rid of metadata file

* cleanup

* fix test

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-12-18 16:53:06 -03:00
Luis Cossío fa525d2b44 Prefer vector index for size_of_available_vectors_in_bytes (#5587)
* get total sparse size from inverted index

* populate on load if not present

* use debug assertion

* correct size calculation

* r u happy clippy

* fix total sparse size in immutable ram

* don't use options. move size_of_available_vectors to other traits

* adjust test

* fix rebase
2024-12-18 13:04:07 -03:00
Arnaud Gourlay 7712f828ab Extract plain vector index (#5675) 2024-12-18 14:56:38 +01:00
xzfc 372a421e86 Implement links compression (#5492)
* common::bitpacking::packed_bits

* BitWriter::new(): append, don't clear the buffer

* common::bitpacking_links

* Implement links compression

* Update
2024-12-18 11:29:34 +00:00
Luis Cossío 9729207bb4 Introduce facet index trait (#5673)
* introduce facet index trait

* clippy

* fix simple bool index's `get_point_values`
2024-12-18 09:53:01 +01:00
229fa94f69 Strict mode for payload storage (#5588)
* Strict mode for payload storage

* Don't increment counter multiple times per request

* Add (loose) integration tests for payload storage limit

* Minor improvements

* minor renaming

* Update lib/api/src/grpc/proto/collections.proto

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

---------

Co-authored-by: jojii <jojii@gmx.net>
Co-authored-by: Jojii <15957865+JojiiOfficial@users.noreply.github.com>
Co-authored-by: Tim Visée <tim+github@visee.me>
2024-12-17 17:33:46 +01:00
Luis Cossíoandtimvisee 14c1979a47 Integrate mmap bool index (#5571)
* add on_disk option for bool index

* test that all files are covered

* generate openapi and docs

* clippy

* remove `populate` changes

* use `walkdir` crate

* Apply clippy suggestions

---------

Co-authored-by: timvisee <tim@visee.me>
2024-12-16 20:35:10 -03:00
dependabot[bot]andArnaud Gourlay 91360f5ee8 build(deps): bump sysinfo from 0.32.1 to 0.33.0 (#5623)
* build(deps): bump sysinfo from 0.32.1 to 0.33.0

Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.32.1 to 0.33.0.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

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

* fix api change

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2024-12-16 14:08:08 +01:00
xzfc 36bdea1761 zerocopy: 0.7 -> 0.8 (#5639) 2024-12-14 22:09:33 +00:00
Jojiiandgenerall e0d0e233d8 Timeout aware hardware counter (#5555)
* Make hardware counting timeout aware

* improve test

* rebuild everything

* fmt

* post-rebase fixes

* upd tests

* fix tests

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-12-10 12:12:36 +01:00
xzfc 55d39bd360 GraphLinksConverter: take m and compressed arguments (#5489)
* GraphLinksConverter: take `m` and `compressed` arguments

* Add m0 parameter

* Fixup

* LinkCompressionExperimentalSetting
2024-12-10 00:23:44 +00:00
Arnaud Gourlay 2a2a7033db Rate limit requests per minute (#5597)
* Rate limit requests per minute

* rename to remove time unit for API
2024-12-10 00:26:37 +01:00
Andrey Vasnetsov 2a5b46e780 use fsync instead of flush (#5629) 2024-12-10 00:13:03 +01:00
Ivan Pleshkov 8490f5cd3c Atomic save chunked mmap config (#5628)
* atomic save chunked mmap config

* are you happy clippy

* log error

* review remarks
2024-12-09 22:24:54 +01:00
Tim Visée fa40e8aac1 Minor refactoring during testing (#5610) 2024-12-09 15:33:26 +01:00
Andrey VasnetsovandLuis Cossío 3ce4035df3 allow to read related issues with collection-level access (#5609)
* allow to read related issues with collection-level access

* refactor to use requirements

* patch test

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2024-12-09 15:29:11 +01:00
Luis Cossío 8c50bc1932 Mmap bool index (#5526)
* add `MmapBitSlice::extend` helper

* mmap bool index implementation

* unit test both implementations

* switch to `DynamicMmapFlags`

* tidy up

* recalculate `indexed_count` on load

* grow bitslice aligned to the mmap page size

* ergonomic get_slice_for

* fix for growing mmap

* use more `get_slice_for()`
2024-12-06 17:29:19 -06:00
Arnaud Gourlay 1e21a4a179 Rate limiting for shard operations (#5582)
* Rate limiting for shard operations

* address all review comments in one go
2024-12-06 11:02:18 +01:00
JojiiandArnaud Gourlay 42fd2e27e2 Strict mode max collection vector size (#5501)
* Strict mode config: Max collection size

* api specs

* Add tests + set/update payload check

* Improve function names and add comments

* rename config to separate vectors and payload

* fix tests

* Adjust configs docs

* add benchmark

* improve performance by caching shard info

* add bench for size_info() and fix tests

* Also limit the batch-size for vector updates (#5508)

* Also limit the batch-size for vector updates

* clippy

* add lost commit

* Load cache on collection initialization

* add unit type to parameter name

* fix renaming in test

* clearer error message

* fix test

* review remarks

* remove unused function for now

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2024-12-05 17:28:09 +01:00
Ivan PleshkovandAndrey Vasnetsov 73259267ae GPU HNSW integration (#5535)
* gpu hnsw

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2024-12-05 00:58:49 +01:00
Luis Cossío 5003b85719 Friendlier untagged enum errors (#5580)
* add friendlier errors for untagged enums

* alias with_vector and with_vectors in query api
2024-12-03 17:53:22 -06:00
Arnaud Gourlay 8a94f0ceba Enforce clippy needless_pass_by_ref_mut (#5561) 2024-12-03 10:15:18 +01:00
Andrey Vasnetsov c8afaee82f rollback: sync rocksdb writes experiment (#5572) 2024-12-03 10:08:37 +01:00
generall f1b2b6e74b sync rocksdb writes experiment 2024-12-03 02:31:09 +01:00
xzfc 4548ebe4bf Reduce debug size (#5556)
* debug size: RawScorerImpl::peek_top_iter

* debug size: TypedMultiDenseVector::multi_vectors() uses

* debug size: stop_condition -> stopped
2024-12-02 14:33:35 +00:00
Arnaud Gourlay 1208093e96 Enforce clippy match_wildcard_for_single_variants (#5560) 2024-12-02 12:29:19 +01:00
Arnaud Gourlay 3ce506ec93 Expose payload storage size in segment info (#5552) 2024-12-02 11:23:36 +01:00
Tim Visée 0c9fdad3f4 Keep temporary segment if not empty (#5550)
* Keep temporary segment if not empty

* Fix is empty condition

* Swap condition because it's cheaper

* Keep segment if no appendable segment or if not empty
2024-11-29 16:37:59 +01:00
Tim Visée ba61ae22bd Fix division by zero in approximate facet API, shortcut instead (#5551) 2024-11-29 14:52:42 +01:00
Andrey Vasnetsov e81e45beb0 it is easy if you know where to look (#5543) 2024-11-28 22:03:11 +01:00
Ivan Pleshkov cd611f54f1 Gpu hnsw construction (#5529)
* gpu hnsw construction

* fix build

* are you happy clippy

* are you happy clippy

* review remarks

* more comments

* external gpu vector storage

* decompose gpu inserter

* are you happy codespell

* are you happy clippy
2024-11-28 09:15:54 +01:00
xzfc ec7caae3b4 Refactor GraphLinksConverter (#5491)
* Introduce HEADER_SIZE = 64

* GraphLinksConverter: rewrite

* Split GraphLinksFileHeader into GraphLinksFileInfo
2024-11-27 21:37:17 +00:00
Luis Cossío 608736219f restructure sparse storages module (#5532) 2024-11-27 13:46:57 -06:00
Luis Cossío 2de122adea Compatibility for mmap sparse vectors (#5454)
* implement mmap sparse vector storage

* add to VectorStorageEnum

* clippy

* add tests, fix both simple and mmap storages

* smol correction on total_vector_count

* add sparse storage type to config

* fix reading config without storage type

* generate openapi

* use blob_store by path

* hidden setting to enable new storage

* validate existing path in `BlobStore::open()`

* use new dir for each sparse vector name

* fix and rename `max_point_offset`

Plus some extra refactors

* add storage compat test, to always check both storages work

* fix opening of storage + other misc fixes

* FIX!!!

`Unset` operations in the Tracker weren't updating the
`next_pointer_id`. So, when reopening the storage, those points wouldn't
get marked as deleted in the bitslice, thus creating the illusion that
they should exist, when they did not.

* refactor naming from `iter_*` to `for_each_*`

* fix checking for BlobStore existance

* fix typo

* fix error message

* better docs for open_or_create

* fix after rebase
2024-11-27 11:45:16 -06:00
Arnaud Gourlay c41283c525 Add retrieving storage size to payload storage trait (#5523) 2024-11-27 17:28:50 +01:00
Arnaud Gourlay 9dcd3dd406 Fix path to new payload storage for optimized segments (#5530)
* Fix path to storage for optimized segment

* add minimal test

* clippy
2024-11-27 16:59:46 +01:00
a653a36645 Points inconsistency during cancel of optimization (#5527)
* test to demonstrate inconsistency failure during optimization

* Fix apply points mixing point versions, only apply operation to latest (#5528)

* Patch apply points, only apply point operations to latest point version

* Simplify test, we don't need owned strings in JSON macro

* Use ahash in apply points because we map to simple numbers

* Minor improvements

* preserve the update version before doing move_if_exists in proxy (#5531)

* preserve the update version before doing move_if_exists in proxy

* Simplify move_if_exists with flat if statements and early return

* Fix inverted condition, consider deleted if delete is new

* Use hash map keys iterator as more idiomatic Rust

---------

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

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: timvisee <tim@visee.me>
2024-11-27 16:46:58 +01:00
Arnaud Gourlay b6caf4e55b Clippy 1.83 (#5513)
* Clippy 1.83

* there is more
2024-11-27 11:24:58 +01:00
Ivan PleshkovandTim Visée a770a7f3a0 Gpu vectors (#5339)
* parent 33b2c176cb
author Ivan Pleshkov <pleshkov.ivan@gmail.com> 1729676438 +0200
committer Ivan Pleshkov <pleshkov.ivan@gmail.com> 1732012991 +0100

parent 33b2c176cb
author Ivan Pleshkov <pleshkov.ivan@gmail.com> 1729676438 +0200
committer Ivan Pleshkov <pleshkov.ivan@gmail.com> 1732012977 +0100

parent 33b2c176cb
author Ivan Pleshkov <pleshkov.ivan@gmail.com> 1729676438 +0200
committer Ivan Pleshkov <pleshkov.ivan@gmail.com> 1732012901 +0100

parent 33b2c176cb
author Ivan Pleshkov <pleshkov.ivan@gmail.com> 1729676438 +0200
committer Ivan Pleshkov <pleshkov.ivan@gmail.com> 1732012766 +0100

parent 33b2c176cb
author Ivan Pleshkov <pleshkov.ivan@gmail.com> 1729676438 +0200
committer Ivan Pleshkov <pleshkov.ivan@gmail.com> 1732012730 +0100

vulkan api wrapper crate

fmt

gpu is not a workspace member

exclude gpu from workspace

disable tests for gpu crate

ash version up

change collection for pipeline builder

gpu test

gpu is not optional

check device features

remove feature

make all fields private

more comments

are you happy fmt

qdrant team as authors

gpu vectors

move changes from magic branch

move storage updates

are you happy codespell

are you happy clippy

don't make storage_impl public

review remarks

are you happy clippy

are you happy fmt

* Update lib/segment/src/index/hnsw_index/gpu/gpu_vector_storage/tests.rs

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

* review remarks

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2024-11-27 09:50:10 +01:00
xzfc 5c24d63e71 GraphLinks::for_each_link (#5490) 2024-11-26 21:35:26 +00:00