Commit Graph

2408 Commits

Author SHA1 Message Date
Redouan El Rhazouani
0c55bcc53d Optimize JSON-Proto Conversion, Improve Memory Allocation, and Add Unit Tests (#5591)
* Optimize JSON-Proto conversion and add unit tests
 * mproved memory allocation by eliminating raw loops
 * Enhanced readability by reducing nesting and restructuring logic for clarity
 * Added tests to assert correctness and reliability of the JSON-Proto conversion process

* Resolve clippy issues
2024-12-06 10:43:58 +01:00
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
Tim Visée
3b8a4180f8 During segment flush, don't release proxy segments right away (#5553) 2024-12-05 16:32:29 +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
Tim Visée
ba5822dad0 Fix point deduplication (#5585)
* Add unit test for point deduplication bug

* Fix point deduplication bug, versions were reused acrosos point IDs

* Add unit test with randomized points and versions

* Remove obsolete comment

* Add link to pull request

* Simplify test a bit
2024-12-04 16:32:16 +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
Tim Visée
3d3ab622cd In proxy segment, apply proxied point delete with its operation version (#5573)
* In proxy segment, apply proxied point delete with its operation version

* Also use correct delete version when propagating changes back to wrapped

* Also delete points with version in segment optimizer build new segment

* Track original/operation point versions separately on proxied deletes

* Fix test compilation failures

* Use explicit types when initializing default
2024-12-03 16:37:33 +01:00
Tim Visée
931c05c1d8 Add debug logs to point deduplication on start (#5577)
* During point deduplication, log selected points and actual deletes

* Change log message
2024-12-03 16:36:57 +01: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
dependabot[bot]
589033830d build(deps): bump fs4 from 0.11.1 to 0.12.0 (#5564)
Bumps [fs4](https://github.com/al8n/fs4-rs) from 0.11.1 to 0.12.0.
- [Release notes](https://github.com/al8n/fs4-rs/releases)
- [Commits](https://github.com/al8n/fs4-rs/commits)

---
updated-dependencies:
- dependency-name: fs4
  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-03 09:50:29 +01:00
generall
f1b2b6e74b sync rocksdb writes experiment 2024-12-03 02:31:09 +01:00
generall
ec3374f195 log segment id on flush 2024-12-03 00:29:23 +01:00
Andrey Vasnetsov
3d695a5c37 logs on flush (#5562) 2024-12-02 17:09:01 +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
32f4cf9deb Rate limit local shard operations (#5539)
* Rate limit local shard operations

* one more test

* remove time sensitive test
2024-12-02 13:37:00 +01: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
Andrey Vasnetsov
bf340ee7e0 make sure wrapped segment is properly flushed before ack WAL (#5557)
* make sure wrapped segment is properly flushed before ack WAL

* fix typo
2024-12-01 18:26:54 +01:00
generall
cef9265e08 fix debug log 2024-11-30 19:24:48 +01:00
generall
96585db0d6 add debug log about version on WAL reading 2024-11-29 20:48:57 +01:00
Tim Visée
0e6b265b03 Remove redundant check if point is in wrapped segment (#5554) 2024-11-29 17:59:58 +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
Tim Visée
212fca9913 Minor improvements during testing (#5541) 2024-11-29 10:47:32 +01:00
Luis Cossío
ed668c636f improve QueryInterface error message (#5546) 2024-11-28 16:26:37 -06:00
Andrey Vasnetsov
e81e45beb0 it is easy if you know where to look (#5543) 2024-11-28 22:03:11 +01:00
Tim Visée
d0a680582c Deduplicate point IDs returned from proxy segment (#5540) 2024-11-28 18:28:28 +01:00
Arnaud Gourlay
8c68841999 Introduce rate limiting error types (#5538) 2024-11-28 16:38:31 +01:00
Andrey Vasnetsov
bba12ccb16 Better debug print for vectors (#5537)
* print only 4 first flaots of the vector

* fmt
2024-11-28 14:11:03 +01:00
Arnaud Gourlay
36d07a5444 Return complete error for sparse vector validation (#5536)
* Return complete error for sparse vector validation

* remove unecessary path

* update test to show new value
2024-11-28 12:27:12 +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
Tim Visée
fe0a5769e5 Expose shard keys in telemetry (#5522)
* Add shard key to replica set

* Expose shard key in replica set telemetry

* Update OpenAPI specification

* Fix two spelling errors
2024-11-27 14:57:37 +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
8cdb44c488 SegmentSearcher stream results (#5521) 2024-11-26 17:50:02 +01:00
xzfc
bc98e90a1d Add common::bitpacking (#5487)
Co-authored-by: generall <generall@thinkstation.fritz.box>
2024-11-26 14:46:38 +00:00
Andrey Vasnetsov
a7d9e82102 better handle non-transient errors (#5506) 2024-11-26 11:53:18 +01: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