Commit Graph

1780 Commits

Author SHA1 Message Date
xzfc
651e307878 Optimize merged_points computation in SegmentBuilder::update() (#5820)
* Optimize `merged_points` computation in `SegmentBuilder::update()`

* Fixes
2025-01-22 14:21:27 +00:00
xzfc
e28e20339c FixedLengthPriorityQueue: explicit sorted/unsorted methods (#5837) 2025-01-22 14:21:11 +00:00
Luis Cossío
5ae42a67bd Safe bounds for point_to_tokens_count (#5845) 2025-01-21 16:12:09 -03:00
Luis Cossío
d9f2baaeeb Avoid flushing a zero-sized mmapped file (#5842) 2025-01-21 16:11:19 -03:00
Luis Cossío
6f3e8dafa3 Remove setting OpenOptions flags to false (#5840) 2025-01-21 11:57:37 -03:00
Arnaud Gourlay
4dee0c5bf4 Strict mode multivector (#5757)
* strict mode for multivector

* simplify impl

* regen docs
2025-01-20 15:53:35 +01:00
Roman Titov
6260eb7d74 Cleanup #[allow(dead_code)] annotations (#5818) 2025-01-17 15:37:13 +01:00
xzfc
d29c9ef99e Rearrange graph_links.rs (#5788)
- Rename `GraphLinksConverter` to `GraphLinksSerializer`.
- Extract some structs from `graph_links.rs` into additional files:
  - `graph_links/header.rs`: `HeaderPlain` and `HeaderCompressed`.
  - `graph_links/serializer.rs`: for `GraphLinksSerializer`.
  - `graph_links/view.rs`: `GraphLinksView`.
- In `header.rs`, remove `HeaderCompressed::version` doc comment about
  `HEADER_VERSION_COMPRESSED` as being outdated after merging #5749.
- Add doc comment to `GraphLinksView`.
- In `view.rs`/`GraphLinksView`, move some associated functions to the
  module level:
  - `read_level_offsets`
  - `get_slice`
  - `error_unsufficent_size`
2025-01-17 11:21:21 +00:00
Jojii
1e52e03767 Fix set_by_key not persisted between reload (#5819) 2025-01-17 12:12:30 +01:00
Jojii
fd4705c29d Measure payload read IO (#5773)
* Measure read io for payload storage

* Add Hardware Counter to update functions

* Fix tests and benches

* Rename (some) *_measured functions back to original
2025-01-16 14:25:55 +01:00
Jojii
3e96fae333 [Strict mode] limits for filter and conditions (#5754)
* Add limits for filter and conditions

* clippy

* Review remarks + nested condition test

* Fix opnapi specs

* Improve error message by giving info about limits and usage
2025-01-14 11:07:27 +01:00
Tim Visée
64be478317 Enable HNSW graph links compression by default (#5781) 2025-01-13 19:23:43 +01:00
Tim Visée
e1a4968d5c Enable mmap storage using blob store for sparse vectors by default (#5784) 2025-01-13 14:46:55 +01:00
Tim Visée
d1bf354874 Experiment: enable bindgen-runtime for RocksDB (#5768)
* Enable bindgen-runtime feature for RocksDB

* Test without libclang and llvm on CI
2025-01-10 15:34:51 +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 Vasnetsov
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
xzfc
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
Arnaud Gourlay
07d8ad81c0 Standardize http crate version (#5727) 2025-01-05 19:45:51 +00:00
Arnaud Gourlay
cbbd363580 Disable default features on smol_str (#5726) 2025-01-03 15:39:12 +01:00
Arnaud Gourlay
3f27ec0100 Refactor proptest usage (#5723) 2025-01-03 11:28:51 +01:00
Arnaud Gourlay
dd9854ad30 Refactor rstest usage (#5721) 2025-01-03 10:21:25 +01:00
dependabot[bot]
7863b31c87 build(deps): bump tinyvec from 1.8.0 to 1.8.1 (#5696)
Bumps [tinyvec](https://github.com/Lokathor/tinyvec) from 1.8.0 to 1.8.1.
- [Changelog](https://github.com/Lokathor/tinyvec/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Lokathor/tinyvec/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: tinyvec
  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>
2025-01-02 10:58:32 +01:00
dependabot[bot]
aad4415cf6 build(deps): bump io-uring from 0.7.2 to 0.7.3 (#5710)
Bumps [io-uring](https://github.com/tokio-rs/io-uring) from 0.7.2 to 0.7.3.
- [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>
2025-01-02 10:15:52 +01: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
Jojii
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ío
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
Arnaud Gourlay
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
dependabot[bot]
672a8c128b build(deps): bump proptest from 1.5.0 to 1.6.0 (#5659)
Bumps [proptest](https://github.com/proptest-rs/proptest) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/proptest-rs/proptest/releases)
- [Changelog](https://github.com/proptest-rs/proptest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/proptest-rs/proptest/commits)

---
updated-dependencies:
- dependency-name: proptest
  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-17 08:05:23 +01:00
Luis Cossío
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]
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
Jojii
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
Tim Visée
8d2b3c6ba2 Add unit test for segment builder bug mixing internal point IDs (#5614)
* Add unit test for segment builder bug mixing internal point IDs

* Link to PR
2024-12-10 09:33:36 +01:00
dependabot[bot]
84f1b8e6f4 build(deps): bump geo from 0.29.2 to 0.29.3 (#5618)
Bumps [geo](https://github.com/georust/geo) from 0.29.2 to 0.29.3.
- [Changelog](https://github.com/georust/geo/blob/main/CHANGES.md)
- [Commits](https://github.com/georust/geo/compare/geo-0.29.2...geo-0.29.3)

---
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-10 08:53:18 +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 Vasnetsov
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