Commit Graph

1780 Commits

Author SHA1 Message Date
Andrey Vasnetsov
e5ee44797e notify optimizers scheduler of the budget change (#6040)
* notify optimizers scheduler of the budget change

* Zero permit count when releasing CPU or IO

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-02-24 11:57:23 +01:00
xzfc
2cc7a4ddd7 gpu: add coherent/readonly/writeonly qualifiers (#6037) 2025-02-24 10:11:03 +00:00
Luis Cossío
08cf86c421 [score boosting] Connect formula to query (#6024)
* finish connecting formula query

* upd openapi
2025-02-21 09:36:18 -03:00
Luis Cossío
279b8dd57e Fix flaky test_keyword_facet test (#6034)
* improve facet tests

* remove iter_filtered_counts_per_value

* clarify comment

* bugfix: add filter for deleted bitslice

* clarify comment in compressed point mappings
2025-02-21 09:27:39 -03:00
Luis Cossío
c2312d0e50 [score boosting] create query structures and parse them (#5990)
* create REST, CollectionQuery, and ShardQuery structures. Parse all variables and conditions

* move stuff around, rename segment Expression to ParsedExpression

* rename to MultExpression

* add Div in REST, use unique geo_distance tag

* review fixes

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-02-21 09:03:25 -03:00
Tim Visée
b50a7027ec Use u32 index in compressed version store, doesn't support bigger values (#6036)
* Use u32 index in compressed version store, doesn't support bigger values

* Patch test
2025-02-21 11:59:47 +01:00
Tim Visée
a9beb7c30d Resolve clippy warnings for Rust 1.85 (#6033) 2025-02-20 15:52:29 -03:00
Andrey Vasnetsov
8d5a34e9e4 Optimize immutable id tracker mapping (#6023)
* clone PointMappings into CompressedPointMappings

* fmt

* compressed internal to external

* implement compressed external to internal mapping

* some autogenerated tests

* fix test

* Explicitly resize deleted flags, ensure length matches number of points

* Review remarks

---------

Co-authored-by: timvisee <tim@visee.me>
2025-02-20 14:21:05 +01:00
Andrey Vasnetsov
1945d086a8 Optimize immutable id tracker (#6022)
* WIP: compressed versions store

* compressed versions store

* fmt

* model test against vec

* use u32::BITS instead of new const

* clippy 😡

* rename CompressedVersionsStore -> CompressedVersions

* Apply suggestions from code review

* Use ahash

* Assert length of version slice

* Add has function

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: timvisee <tim@visee.me>
2025-02-20 13:41:50 +01:00
Andrey Vasnetsov
f7d0814ab6 IO resource usage permit (#6015)
* rename cpu_budget -> resource_budget

* clippy

* add io budget to resources

* fmt

* move budget structures into a separate file

* add extend permit function

* dont extend existing permit

* switch from IO to CPU permit

* do not release resource before aquiring an extension

* fmt

* Review remarks

* Improve resource permit number assertion

* Make resource permit replace_with only acquire extra needed permits

* Remove obsolete drop implementation

* allocate IO budget same as CPU

* review fixes

---------

Co-authored-by: timvisee <tim@visee.me>
2025-02-20 09:05:00 +01:00
Luis Cossío
b90b971e8b [score boosting] handle rescoring up to local shard (#6019)
* handle rescoring up to local shard

* use heap to keep only best points

* add stopping flag

* handle wrapped segment deletions

* drop ordering, assume always LargeBetter

* use ahash for u32 keys

* micro optimization on update_point_versions

* use Option instead of Vec for error

* clarify comment
2025-02-19 13:16:02 -03:00
Roman Titov
fd3d25459c Prototype partial segment snapshots and SegmentManifest format (#5928)
Co-authored-by: generall <andrey@vasnetsov.com>
2025-02-18 11:08:17 +01:00
Arnaud Gourlay
d88e76f90d Fix Clippy 1.85 (#6011)
* Fix Clippy 1.85

* fix false positive
2025-02-18 10:41:28 +01:00
dependabot[bot]
3bdb0eb1c3 build(deps): bump smallvec from 1.13.2 to 1.14.0 (#6007)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.13.2 to 1.14.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.13.2...v1.14.0)

---
updated-dependencies:
- dependency-name: smallvec
  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>
2025-02-18 09:41:16 +01:00
Luis Cossío
79b9a31d53 [score boosting] evaluate formula (#5980)
* evaluate expressions, given resolved variables

* lazily resolve variables and conditions

* optimize multiplication and division evaluation

* review fix

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-02-17 13:44:37 -03:00
generall
b2782ff11f fix hnsw on_disk param handelling 2025-02-15 20:59:43 +01:00
Luis Cossío
3a87be6239 Merge pull request #5981
* add the structures for a parsed formula, including expressions

* construct formula scorer
2025-02-14 16:04:32 +01:00
Luis Cossío
eb645da6ac Merge pull request #5979
* add the structures for a parsed formula, including expressions
2025-02-14 15:47:21 +01:00
Luis Cossío
f1b7d82770 Merge pull request #5965
* begin extracting variable values

* extract geo point

* add extractor tests

* move TODO comment

* simplify fn

* rename extract -> retrieve

* add hw counters

* use plain serde_json::Value as output

* clippy

* use from notation
2025-02-14 15:34:22 +01:00
Arnaud Gourlay
1a7e2701d7 Add strict mode for max points count (#5967)
* Add strict mode for max points count

* clarify estimated nature
2025-02-12 11:10:51 +01:00
Tim Visée
b42746d0e1 Always delete old point versions when applying point operation (#5962)
* Always delete old point versions when applying point operation

* Add helper struct for updates/deletes, make selection more readable

* Cleanup

* Add debug assertion

* If having multiple point versions, delete first, then apply operations

* Deleted old points with their existing point version, extend test

* Don't delete other points with the same version for now, add test case

* Remove helper struct since updates and deletes are separated again

* Smarter capacity estimate

* apply change to all points with latest version

* Use small vec extra allocations

* Eliminate delete closure, delete internally and pass hardware counter

* Update comment

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-02-11 14:32:23 +01:00
Tim Visée
bac4a298e1 In ID tracker fixture, exclude deleted points (#5961)
* In ID tracker fixture, exclude deleted points

* Update docs
2025-02-10 19:07:55 +01:00
Arnaud Gourlay
52d686691d Update to nom 8 (#5963)
* Update to nom 8

* nit: avoid local binding

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-02-10 17:11:14 +01:00
Arnaud Gourlay
9c00903e76 Optimize RocksDB buffered wrapper with single Mutex (#5915)
* Optimize RocksDB buffered wrapper with single Mutex

* deconstruct struct to not foget field later
2025-02-10 15:10:39 +01:00
Luis Cossío
0c81adc588 [mmap sparse vector storage] return cancelled error if stopped (#5938)
* return cancelled error if stopped

* add doc comment and renames
2025-02-03 19:25:22 -03:00
Jojii
bae4c08a2a Measure IO reads for vectors (#5912) 2025-02-03 11:56:43 +01:00
xzfc
ae3a57caba Turn for_each_packed_link into iterator (#5897)
* More cases for `bitpacking_links::tests`

* Turn `for_each_packed_link` into iterator

* Test `check_iterator_fold` and `check_exact_size_iterator_len`

* Drop `for_each_packed_link` and use `iterate_packed_links`

* Introduce `LinksIterator` for `segment`
2025-01-31 12:10:16 +00:00
xzfc
b23cd8cb87 Use simple_segment_constructor (#5919)
* VECTOR1_NAME and VECTOR2_NAME

* Use simple_segment_constructor
2025-01-30 20:15:33 +00:00
Luis Cossío
5d9d5bd3f9 Rename blob_store as gridstore (#5918)
* rename blob_store into gridstore

Article is incoming and I feel like gridstore is a better fit to the
architecture

* fmt

* remove outdated TODO
2025-01-30 14:56:34 -03:00
Arnaud Gourlay
421f467252 Relax consistency check for WAL replay (#5909) 2025-01-30 15:47:15 +01:00
Arnaud Gourlay
87cd1696eb Fix flushing of RocksDB sparse vector storage (#5908) 2025-01-30 14:19:22 +01:00
Jojii
5a321d6f09 HwCounter rename IO metrics (#5898)
* Rename io metrics and add vector_io_write

* Chore: Cleanup obsolete TODOs and simplify retrieving HardwareCounterCells (#5899)
2025-01-30 10:23:35 +01:00
Luis Cossío
af74d1b96a bump and migrate to rand 0.9.0 (#5892)
* bump and migrate to rand 0.9.0

also bump rand_distr to 0.5.0 to match it

* Migrate AVX2 and SSE implementations

* Remove unused thread_rng placeholders

* More random migrations

* Migrate GPU tests

* bump seed

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-01-28 16:19:11 +01:00
Ivan Pleshkov
67d4f3bfa7 Support gpu devices without half float (#5891)
* support gpu devices without half float

* disable f16 feature

* are you happy clippy

* Extend log warning if f16 is not supported

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-01-28 10:39:56 +01:00
xzfc
34b039e9b1 Add payload_json! macro (#5881)
* Add payload_json! macro

* Replace usage of `json!({...})` with `payload_json! {...}`

* Drop `impl From<Value> for Payload`
2025-01-28 10:35:02 +01:00
dependabot[bot]
675299d028 build(deps): bump io-uring from 0.7.3 to 0.7.4 (#5888) 2025-01-27 20:53:17 +00:00
xzfc
054273c44b Pass old_indices to HNSWIndex::new (#5835) 2025-01-27 06:54:13 +00:00
Jojii
a57af177ea Propagate hardware counter for more functions (#5844)
* Propagate hardware counter for more functions

* Minor improvements

* use vector_query_contexts hardware_counter
2025-01-24 16:33:44 +01:00
Arnaud Gourlay
6bf4a4c930 Filter out points without version to honor flushing sequence (#5866) 2025-01-24 13:11:39 +01:00
xzfc
d90a68137b Add VectorName type alias (#5763)
* Add VectorName/VectorNameBuf type aliases [1/2]

* Add VectorName/VectorNameBuf type aliases [2/2]
2025-01-24 01:29:01 +00:00
xzfc
bf981e525f Split HNSWIndex::open and HNSWIndex::build (#5853)
* HNSWSearchesTelemetry::new()

* Split HNSWIndex::open and HNSWIndex::build
2025-01-24 00:09:57 +00:00
n0x29a
1796c76e35 Strict mode sparsevector (#5841)
* Strict mode sparse vectors
* Update gRPC docs
* Use deny_unknown_fields (#5868)

---------

Co-authored-by: n0x29a <n0x29a@example.com>
Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-01-23 17:34:38 +00:00
Arnaud Gourlay
05e3823066 Fix flush of deleted flags for mmap payload storage (#5861)
* Fix flush of deleted flags for mmap payload storage

* no filtering
2025-01-23 14:02:06 +01:00
Jojii
1e7b149fe7 Implement more IO measurements for PayloadStorage (#5822)
* Finish io measurement for payload storage

* Remove done TODOs

* review remarks

* make signature of `wipe()` consistent

* Remove hardware_counter from tracker.rs and make interfaces consistent

* Add hw_counter to payloads update_storage function from dev
2025-01-23 12:23:47 +01:00
Roman Titov
d9afe06b12 Fix test_set_by_key_consistency test (#5860)
* Fix `test_set_by_key_consistency` test

* Trigger CI 🙄
2025-01-23 11:52:39 +01:00
Jojii
d1c9b16398 Io measurement rename functions (#5816)
* replace _measured functions with original name

* Rename more functions
2025-01-23 10:58:25 +01:00
Ivan Pleshkov
d874ccb8a7 Fix gpu for empty payload block #5821 (#5847)
* fix #5821

* allow empty gpu buffers and fix ci test with empty vector storage

* remove unnecessary check

* allow empty vector storage on higher level
2025-01-23 10:51:07 +01:00
Roman Titov
660d42138b Cleanup some error types and conversions (#5855)
* Remove unused `OperationError::MissedVectorName` variant

* Remove `common::io::file_operations::Error::Errno` variant...

...and simply convert `nix::Errno` into `Error::Io`

* Tweak `common::io::file_operations::Error` into `io::Error` conversion

* Cleanup `common::io::file_operations`

* fixup! Remove `common::io::file_operations::Error::Errno` variant...

Replace explicit `nix::Error` into `Error` conversion with a `map_err` call
2025-01-23 09:38:45 +01:00
xzfc
12137d2264 Fix cargo doc warnings (#5854) 2025-01-23 09:37:20 +01:00
Ivan Pleshkov
c32cee8d2d filter broken gpu links (#5848)
are you happy fmt
2025-01-23 00:50:55 +01:00