Commit Graph

1180 Commits

Author SHA1 Message Date
Jojii
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 Pleshkov
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
dependabot[bot]
1b78ebd682 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-03 10:14:21 +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
Andrey Vasnetsov
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 Pleshkov
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
xzfc
0d90fad3e3 Drop GraphLayersBackwardCompatibility (#5486) 2024-11-26 19:17:04 +00:00
Luis Cossío
6a20f2bc2c Refactor bool index (#5524)
* rename binary->bool

* restructure bool_index module

* rename Boolean->Bool

* rename memory_bool_index -> simple_bool_index
2024-11-26 11:33:27 -06:00
Arnaud Gourlay
4085c0b17b 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-11-26 10:07:28 +01:00
dependabot[bot]
e5d2abd35e 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-11-26 07:55:17 +01:00
Arnaud Gourlay
62643f5f80 Compute facets by streaming shard resuls (#5514) 2024-11-25 16:40:05 -06:00
Luis Cossío
fbf2ca940f [vector storages] Don't skip marking as deleted (#5510)
* don't skip marking as deleted

* edit test, which fails in dev

* better description
2024-11-25 08:31:03 -06:00
Jojii
5417428951 Add max upsert batch size strict mode option (#5485) 2024-11-19 19:06:57 +01:00
xzfc
a715ce45d2 Add WriteZerosExt to write zeros (#5435) 2024-11-19 08:02:59 +00:00
dependabot[bot]
c43353a5d0 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-11-19 08:58:25 +01:00
dependabot[bot]
01aeae9b55 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-11-19 06:55:10 +01:00
Luis Cossío
b895bcd872 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-11-18 12:43:52 -06:00
Arnaud Gourlay
c537952338 Fix large variant for fulltext index (#5458) 2024-11-18 12:42:55 +01:00
Arnaud Gourlay
33b2c176cb Fix clippy large variant for filter condition (#5455) 2024-11-18 11:03:18 +01:00
Andrey Vasnetsov
b72f05fa37 Fixes for rescoring param usage and HNSW (#5457)
* fixes for rescoring param usage and hsnw

* box for clippy
2024-11-18 10:31:34 +01:00
Arnaud Gourlay
23f2e5ad13 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-15 17:14:37 +01:00
xzfc
3eb5bdc137 Introduce GraphLinksRef (#5377)
* GraphLinksView

* GraphLinks::links: return iterator instead of slice
2024-11-15 05:19:55 +00:00
Andrey Vasnetsov
c53ad9c103 use more stable computation of vectors_size_bytes + refactoring (#5437)
* use more stable computation of vectors_size_bytes + refactoring

* sync openapi
2024-11-13 16:52:14 +01:00
Luis Cossío
d902422203 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-13 08:49:42 -06:00
Arnaud Gourlay
e3f08882a7 Leverage ahash in search results (#5428) 2024-11-12 17:16:12 +01:00
xzfc
295804901b Fixup for VisitedListHandle::check_and_update_visited (#5427) 2024-11-12 12:39:27 +01:00
Arnaud Gourlay
22f7e89849 Optimize serch batch (#5415) 2024-11-11 18:23:25 +01:00
Luis Cossío
5d3379ae01 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-11 10:38:43 -06:00
Arnaud Gourlay
2a0f9e9212 Use references for less cloning when possible (#5409) 2024-11-11 10:26:17 +01:00
Arnaud Gourlay
12d800d36f Do not pass PointOffsetType by reference (#5406) 2024-11-08 16:54:52 +01:00
Arnaud Gourlay
a9c45313e7 Remove redundant clones (#5402)
* Remove redundant clones

* fmt
2024-11-08 13:02:23 +01:00
Arnaud Gourlay
8cb4bbcb03 ID mapping should only be saved on flush (#5386) 2024-11-07 18:16:26 +01:00
Arnaud Gourlay
9b741eadd1 Optimize VisitedList counter reset (#5393) 2024-11-07 18:15:47 +01:00