Commit Graph

1175 Commits

Author SHA1 Message Date
Arnaud Gourlay
3c19eea9ca Rate limiting for shard operations (#5582)
* Rate limiting for shard operations

* address all review comments in one go
2024-12-09 11:18:50 +01:00
Jojii
0702854477 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-09 11:18:33 +01:00
Ivan Pleshkov
4f99e728aa GPU HNSW integration (#5535)
* gpu hnsw

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2024-12-09 11:18:16 +01:00
Luis Cossío
13b85639b6 Friendlier untagged enum errors (#5580)
* add friendlier errors for untagged enums

* alias with_vector and with_vectors in query api
2024-12-09 11:18:08 +01:00
Arnaud Gourlay
c6a964ecfa Enforce clippy needless_pass_by_ref_mut (#5561) 2024-12-09 11:17:33 +01:00
dependabot[bot]
1d734722aa build(deps): bump charabia from 0.9.1 to 0.9.2 (#5567)
Bumps [charabia](https://github.com/meilisearch/charabia) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/meilisearch/charabia/releases)
- [Commits](https://github.com/meilisearch/charabia/compare/v0.9.1...v0.9.2)

---
updated-dependencies:
- dependency-name: charabia
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 11:17:30 +01:00
Andrey Vasnetsov
128384444b rollback: sync rocksdb writes experiment (#5572) 2024-12-09 11:17:25 +01:00
generall
6ec92ece92 sync rocksdb writes experiment 2024-12-09 11:16:47 +01:00
xzfc
8bbe66c0fb Reduce debug size (#5556)
* debug size: RawScorerImpl::peek_top_iter

* debug size: TypedMultiDenseVector::multi_vectors() uses

* debug size: stop_condition -> stopped
2024-12-09 11:16:38 +01:00
Arnaud Gourlay
e3344b2f96 Enforce clippy match_wildcard_for_single_variants (#5560) 2024-12-09 11:15:11 +01:00
Arnaud Gourlay
d47c8f916a Expose payload storage size in segment info (#5552) 2024-12-09 11:15:06 +01:00
Tim Visée
a11f6ae05d 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-12-09 11:13:50 +01:00
Tim Visée
e1002e25d8 Fix division by zero in approximate facet API, shortcut instead (#5551) 2024-12-09 11:13:44 +01:00
Andrey Vasnetsov
eec2044309 it is easy if you know where to look (#5543) 2024-12-09 11:08:46 +01:00
Ivan Pleshkov
362a721d08 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-12-09 11:08:03 +01:00
xzfc
df7a70bd93 Refactor GraphLinksConverter (#5491)
* Introduce HEADER_SIZE = 64

* GraphLinksConverter: rewrite

* Split GraphLinksFileHeader into GraphLinksFileInfo
2024-12-09 11:07:07 +01:00
Luis Cossío
443358dbe7 restructure sparse storages module (#5532) 2024-12-09 11:07:04 +01:00
Luis Cossío
c10c145a75 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-12-09 11:07:01 +01:00
Arnaud Gourlay
716e85e6a7 Add retrieving storage size to payload storage trait (#5523) 2024-12-09 11:06:58 +01:00
Arnaud Gourlay
ec90e162ec Fix path to new payload storage for optimized segments (#5530)
* Fix path to storage for optimized segment

* add minimal test

* clippy
2024-12-09 11:06:54 +01:00
Andrey Vasnetsov
ddde62196b 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-12-09 11:06:47 +01:00
Arnaud Gourlay
f416f2b98f Clippy 1.83 (#5513)
* Clippy 1.83

* there is more
2024-12-09 11:06:24 +01:00
Ivan Pleshkov
5327a322a6 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-12-09 11:06:20 +01:00
xzfc
1db3cfaa36 GraphLinks::for_each_link (#5490) 2024-12-09 11:02:41 +01:00
xzfc
1637ee490a Drop GraphLayersBackwardCompatibility (#5486) 2024-12-09 11:02:37 +01:00
Luis Cossío
82daa2121c Refactor bool index (#5524)
* rename binary->bool

* restructure bool_index module

* rename Boolean->Bool

* rename memory_bool_index -> simple_bool_index
2024-12-09 11:02:33 +01:00
Arnaud Gourlay
9f518b963c Expose storage size of RocksDB payload storage (#5509)
* Expose storage size of RocksDB payload storage

* no strict check as numbers vary on various OS

* loose assertions

* try again for Windows

* assert storage size range
2024-12-09 11:02:08 +01:00
dependabot[bot]
21023fc4e1 build(deps): bump io-uring from 0.7.1 to 0.7.2 (#5518)
Bumps [io-uring](https://github.com/tokio-rs/io-uring) from 0.7.1 to 0.7.2.
- [Commits](https://github.com/tokio-rs/io-uring/commits)

---
updated-dependencies:
- dependency-name: io-uring
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 11:01:57 +01:00
Arnaud Gourlay
b24dc6c35e Compute facets by streaming shard resuls (#5514) 2024-12-09 10:52:39 +01:00
Luis Cossío
4e6673966c [vector storages] Don't skip marking as deleted (#5510)
* don't skip marking as deleted

* edit test, which fails in dev

* better description
2024-12-09 10:52:31 +01:00
Jojii
7b83223c8c Add max upsert batch size strict mode option (#5485) 2024-12-09 10:48:49 +01:00
xzfc
e49a0efdd5 Add WriteZerosExt to write zeros (#5435) 2024-12-09 10:46:58 +01:00
dependabot[bot]
b795f812c1 build(deps): bump cc from 1.1.37 to 1.2.1 (#5466)
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.1.37 to 1.2.1.
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.1.37...cc-v1.2.1)

---
updated-dependencies:
- dependency-name: cc
  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>
2024-12-09 10:46:55 +01:00
dependabot[bot]
57df0275a5 build(deps): bump geo from 0.29.1 to 0.29.2 (#5467)
Bumps [geo](https://github.com/georust/geo) from 0.29.1 to 0.29.2.
- [Changelog](https://github.com/georust/geo/blob/main/CHANGES.md)
- [Commits](https://github.com/georust/geo/compare/geo-0.29.1...geo-0.29.2)

---
updated-dependencies:
- dependency-name: geo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 10:46:02 +01:00
Luis Cossío
21ba00d284 Transfer blob_store into this repo (#5436)
* copy-paste blob_storage

* get rid of copied utils

* fix clippy

* fmt

* audit blob_store manifest

* move `Payload` into `fixtures.rs`

* fix clippy

* put csv in google storage

* ignore hm test

* fix codespell

* improve files test

* test different block sizes

* remove unused deps

* replace StdRng with SmallRng for faster tests
2024-12-09 10:45:43 +01:00
Arnaud Gourlay
1a54ff000f Fix large variant for fulltext index (#5458) 2024-12-09 10:44:28 +01:00
Arnaud Gourlay
c3068aaf27 Fix clippy large variant for filter condition (#5455) 2024-12-09 10:44:22 +01:00
Andrey Vasnetsov
2626f22c3d Fixes for rescoring param usage and HNSW (#5457)
* fixes for rescoring param usage and hsnw

* box for clippy
2024-11-18 11:23:49 +01:00
Arnaud Gourlay
d15ef49719 Optimize mmap sequential access for large scoring (#5440)
* Optimize mmap sequential access for large scoring

* use it

* make windows happy

* add missing CPU counters

* Will not need

* more unix build

* add benchmark

* fix and bench cmp

* larger batch size

* start appendable mmap implem

* reenable debug for bench

* remove old impl for comparison

* impl for chunk mmap

* fix windows

* debug assert

* errare human est

* windows cfg

* generalize peek_top_iter

* remove blanket implementation to force explicit decision

* less TODO

* account for size of T

* fmr

* simplify chunk impl

* relax constraint on contiguous ids

* remove madvice WILLNEED and clean batching infra

* some premature optimizations

* extra sequential mmap for MMapVectorStorage

* add read-only typed mmap

* add read-only typed mmap

* fix comments

* implement batch reads for chuncked mmap

* fix is_read_with_prefetch_efficient

* cleanup

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-18 11:18:38 +01:00
xzfc
2fb5f12ea7 Introduce GraphLinksRef (#5377)
* GraphLinksView

* GraphLinks::links: return iterator instead of slice
2024-11-18 11:18:00 +01:00
Andrey Vasnetsov
28a89060d1 use more stable computation of vectors_size_bytes + refactoring (#5437)
* use more stable computation of vectors_size_bytes + refactoring

* sync openapi
2024-11-18 11:16:57 +01:00
Luis Cossío
6c162656f3 Backward compatibility for mmap payload storage (#5398)
* support mmap storage backward compat

* fix clippy

* review fixes + bump + restore Cargo.lock

* fix clippy

* map_err instead of match

* add sanity tests for payload storage trait

* fix clippy

* error conversion

* test persistance too

* add config to enable mmap storage (#5434)
2024-11-18 11:11:56 +01:00
Arnaud Gourlay
87479d1930 Leverage ahash in search results (#5428) 2024-11-18 11:11:49 +01:00
xzfc
157d5567e3 Fixup for VisitedListHandle::check_and_update_visited (#5427) 2024-11-12 14:40:10 +01:00
Arnaud Gourlay
b50c547cee Optimize serch batch (#5415) 2024-11-12 14:39:28 +01:00
Luis Cossío
719f4f4094 Make default_on_disk_payload consistent with config file (#5396)
* make the default `on_disk_payload` match the default config value

* remove duplicate impl, update docstrings

* change default `PayloadStorageType` too

* gen openapi
2024-11-12 14:39:25 +01:00
Arnaud Gourlay
98633cbd3f Use references for less cloning when possible (#5409) 2024-11-12 14:39:13 +01:00
Arnaud Gourlay
103b86841b Do not pass PointOffsetType by reference (#5406) 2024-11-12 14:39:02 +01:00
Arnaud Gourlay
28dfb3ef74 Remove redundant clones (#5402)
* Remove redundant clones

* fmt
2024-11-08 14:49:24 +01:00
Arnaud Gourlay
4eb2d880b1 ID mapping should only be saved on flush (#5386) 2024-11-08 11:27:41 +01:00