Commit Graph

3618 Commits

Author SHA1 Message Date
dependabot[bot]
320ad5545b build(deps): bump io-uring from 0.7.6 to 0.7.7 (#6552)
Bumps [io-uring](https://github.com/tokio-rs/io-uring) from 0.7.6 to 0.7.7.
- [Commits](https://github.com/tokio-rs/io-uring/commits)

---
updated-dependencies:
- dependency-name: io-uring
  dependency-version: 0.7.7
  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-05-20 11:38:18 +02:00
dependabot[bot]
3d529d3598 build(deps): bump object_store from 0.12.0 to 0.12.1 (#6553)
Bumps [object_store](https://github.com/apache/arrow-rs-object-store) from 0.12.0 to 0.12.1.
- [Changelog](https://github.com/apache/arrow-rs-object-store/blob/main/CHANGELOG-old.md)
- [Commits](https://github.com/apache/arrow-rs-object-store/compare/v0.12.0...v0.12.1)

---
updated-dependencies:
- dependency-name: object_store
  dependency-version: 0.12.1
  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-05-20 09:27:44 +02:00
xzfc
e5d3f4e631 HNSW healing (#6543)
* Let SearchContext::new create empty context

* FixedLengthPriorityQueue: add `is_full()`

* Implement HNSW healing

* Apply review suggestions

* review comments and docstrcigs

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-05-19 15:47:37 +00:00
Tim Visée
6742e9b023 Add full text payload index congruence test (#6546)
* Add congruence test for full text payload index

* Report what index variants we're testing

* Use string references

* deterministic keywords

* linting

* Use truncate instead of drain

* Don't check cardinality on deletion, indices behave differently

* Include index type in iterator

* Fix test compilation

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-05-19 12:48:41 +02:00
xzfc
7f6d22c533 Remove some generics from scorer (#6544)
* Make TInputQuery constructor parameter, not struct parameter

* VectorElementType could be implicit
2025-05-16 08:57:08 +00:00
Arnaud Gourlay
5ae56b3777 Fix unecessary unsafe in Clippy 1.87 (#6540)
* Fix unecessary unsafe in Clippy 1.87

* bump Rust version for intrinsics safe API

* ignore until we can bump the MSRV with cargo-chef

* remove unecessary change

* mark clearly as TODO
2025-05-15 21:41:30 +02:00
Arnaud Gourlay
db31bd2e93 Always overwrite existing payload on upsert (#6533)
* Always overwrite existing payload on upsert

* Add REST tests
2025-05-15 13:15:36 +02:00
Arnaud Gourlay
6575e1f943 Cap max number of concurrent S3 upload (#6536) 2025-05-15 13:15:17 +02:00
Kumar Shivendu
db514674ce Abort transfer on force peer delete and add test for bug (#6505)
* Test for reproducing force delete peer bug

* drop seed port

* use larger transfers to ensure killing before transfer is completed

* simplify test cases

* kill and wait for same commit before force delete

* Don't kill to avoid breaking consesnsus before force delete peer

* Abort transfer on force peer delete (#6507)

* Abort transfer on force peer delete

* ToC changes to abort internally

* Abort shard transfer using consensus not just locally

* fmt

* fix fmt

* Abort transfers internally when shard is being removed

* remove unused imports
2025-05-15 15:29:25 +05:30
n0x29a
73e7b17ee8 Refactor: move HardwareUsage to the Usage map (#6532)
---------

Co-authored-by: jojii <jojii@gmx.net>
2025-05-14 21:01:49 +02:00
Luis Cossío
e2d1e6422b Use null index more (#6504)
* take max_point_offset into consideration

* add null index even if index selector is for rocksdb

* fmt

* better cardinality estimation, check deleted inside filtered iter

* fix count indexed points, add primary conditions to estimator

* use len for count_indexed_points, adjust test

* remove deleted check from filtered iter

* cleaner removal
2025-05-14 14:55:49 -04:00
Jojii
37a586726e Make gridstore Advise::Random and add function for sequential read (#6510)
* Make gridstore Advise::Random and add function for sequential read

* Reduce duplicate code in gridstore

* use sequential implementation in iterator

* actually use the sequential read

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-05-14 15:09:37 +02:00
Tim Visée
c654c33460 Fix immutable mmap index files not included in snapshot (#6535)
* Fix immutable text index not listing files for snapshot

* Other tweaks
2025-05-14 13:50:04 +02:00
Tim Visée
932d9532e2 Merge pull request #6503
* Add storage enum to geo index

* Construct immutable geo index from mmap geo index

* Load immutable geo index from mmap storage if on-disk is false

* When immutable geo index is loaded into memory, clear mmap cache

* Adjust immutable geo index from mmap loading, consider point deletions

* Rename get_db_wrapper to db_wrapper

* Add immutable mmap geo index test, currently still failing

* Properly load geo index

* Add congruence test

* Also test with deletions

* Fix clipping warnings
2025-05-13 13:06:22 +02:00
Andrey Vasnetsov
95fdae60c3 Use single-file mmap for non-appendable segments with vectors on-disk (#6506)
* Use single-file mmap for non-appendable segments with vectors on-disk

* remove useless comment
2025-05-13 11:12:28 +02:00
dependabot[bot]
0454146a74 build(deps): bump tempfile from 3.19.1 to 3.20.0 (#6523)
* build(deps): bump tempfile from 3.19.1 to 3.20.0

Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.19.1 to 3.20.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.19.1...v3.20.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-version: 3.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Use keep now as into_path is deprecated

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: timvisee <tim@visee.me>
2025-05-13 10:48:57 +02:00
dependabot[bot]
e3b24d4aef build(deps): bump actix-web from 4.10.2 to 4.11.0 (#6525)
Bumps [actix-web](https://github.com/actix/actix-web) from 4.10.2 to 4.11.0.
- [Release notes](https://github.com/actix/actix-web/releases)
- [Changelog](https://github.com/actix/actix-web/blob/master/CHANGES.md)
- [Commits](https://github.com/actix/actix-web/compare/web-v4.10.2...web-v4.11.0)

---
updated-dependencies:
- dependency-name: actix-web
  dependency-version: 4.11.0
  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-05-13 07:56:38 +02:00
Arnaud Gourlay
46f00d5fdb Fix Clippy 1.87 bis (#6518) 2025-05-12 19:54:13 +02:00
Tim Visée
7c43f25544 Use more write buffers, and flush them (#6514)
* Explicitly flush buffered writers so that we catch errors

* Buffer IO in more places

* Tweaks

* Apply review suggestions
2025-05-12 17:37:51 +02:00
Arnaud Gourlay
1e3017b304 Clippy 1.87 autofix (#6516)
* Clippy 1.87 autofix

* fmt
2025-05-12 15:51:34 +02:00
Tim Visée
01e61aed64 Add in-memory payload index on mmap storage (full text) (#6495)
* Add storage enum to full text index

* Add compressed mmap posting list iterator

* Don't check second condition and return early if possible

* Use helper function for creating empty iterator

* Construct immutable inverted index from mmap inverted index

* Construct immutable text index from mmap text index

* Load immutable text index from mmap storage if on-disk is false

* Match implementation for mutable to immutable inverted index, drop empty

* Point tokens should be none if empty

* Fix chunk reader iterator not buffering remaining postings correctly

* Add immutable mmap full text index to congruence test

* Debug assert deleted points have no tokens

* Add another test

* Fix point deletion regression in immutable full text index

* Use consistent function naming

* Restructure full text index opening and loading, make it consistent

* When immutable full text index is loaded into memory, clear mmap cache

* Remove init from immutable text index

* Prevent potential panic

* avoid panic

* Fix custom iterator size reporting, add test for it

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-05-12 10:58:36 +02:00
Roman Titov
553dae61e5 Simplify tar_ext module (#5873)
- Replace `WriteSeekBox*` with `SeekWrapper`
- Fix paste-bugs in tests
2025-05-12 10:34:36 +02:00
xzfc
998675e33c Heuristic optimization (#6501)
* Refactor out LinksContainer

This commit extracts Vec<PointOffsetType> and heuristic related
functions from graph_layers_builder.rs into a new file.

No significant changes in logic are made.

* Optimize LinksContainer

* Add illustration

* Fixups

* Add more comments and rename `score` to `cached_score`
2025-05-09 21:48:52 +00:00
Andrey Vasnetsov
aa95b9d82a Batched reader for segment construction (#6487)
* naive implementation of batched reader for segment construction

* Make reads sequential in BatchedVectorReader (#6508)

* Add sequential reads and improve BatchedVectorReader

* implement get_many_sequential

---------

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

* implement get_many_sequential

---------

Co-authored-by: Jojii <15957865+JojiiOfficial@users.noreply.github.com>
2025-05-09 16:24:42 +02:00
Tim Visée
833f310c3d Buffer all file IO when used as reader or writer (#6513) 2025-05-09 15:48:50 +02:00
Tim Visée
4a9469157b Use same min IO permits logic as for CPU, prevent asymmetric utilization (#6502) 2025-05-09 14:30:40 +02:00
Jojii
fa9d0ec406 HardwareCounterCell::disposable() Performance Improvement (#6511)
* Improve performance of HardwareCounterCell::disposable() by 72x

* Fix ci
2025-05-09 11:11:22 +02:00
Tim Visée
424de4bf9f Add in-memory payload indices on mmap storage (numeric, map) (#6444)
* Add RAM wrapper to mmap numeric index

* Add RAM wrapper to mmap map index

* Fix test compilation

* Merge RAM wrappers into existing immutable indices

Do this to minimize code duplication since the majority of the code is
exactly the same.

* Minor tweaks

* Remove unnecessary pub visibility, remove unused assertion

* Test immutable numeric index on mmap

* In numeric index test, remove some points

* Add map index test

* Restructure index opening and loading, make it consistent

* don't pre-collect intermediate mapping

* review nits

* Make init unreachable for immutable and mmap, clear must consume index

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-05-08 12:34:52 +02:00
Arnaud Gourlay
7f0b48a8a3 Fix missing API validations (#6499) 2025-05-07 19:10:14 +02:00
Luis Cossío
93dea164e8 Deterministic HNSW builder (#6477)
* pass a RNG to hnsw index building

* use single-threaded build for accuracy-measuring tests

* clippy
2025-05-07 11:20:19 -04:00
Arnaud Gourlay
fc64334e29 Validate IntegerIndexParams (#6494)
* Validate IntegerIndexParams

* focus
2025-05-07 16:35:57 +02:00
Tim Visée
064fc24778 Don't batch queries if having more segments than search threads (#6478)
* Don't batch query if there's more segments than CPUs, limit threads

* Don't batch query if there's more segments than search threads

* Link to pull request

* Add note that we only consider local segments and global search threads
2025-05-07 12:57:48 +02:00
dependabot[bot]
381b3cc062 build(deps): bump io-uring from 0.7.5 to 0.7.6 (#6492) 2025-05-05 21:30:02 +00:00
Arnaud Gourlay
1bdf1f34ae Strict mode detects full scan on query (#6473) 2025-05-05 15:59:13 +02:00
Arnaud Gourlay
9d6a08e3ce Fix missing gRPC query validations (#6485) 2025-05-05 15:58:48 +02:00
Ivan Pleshkov
737c15c71d Don't reallocate gpu resources between payload blocks (#6462)
* dont reallocate gpu resources between payload blocks

* are you happy codespell

* fix review remarks

* fix gpu tests

* are you happy clippy
2025-05-05 14:42:09 +02:00
ip75
71ee82f42c build with GPU feature on FreeBSD 14.2 (#6483) 2025-05-05 11:13:13 +02:00
Arnaud Gourlay
b8698cf88b Fix strict mode unindexed group_by path (#6363)
* Fix strict mode unindexed group_by path

* check index schema for matching support

* Handle disabled lookup on integer index
2025-05-02 15:19:50 +02:00
Arnaud Gourlay
08e809feb4 Fix flaky test rate limiter (#6476) 2025-04-30 16:57:46 +02:00
Tim Visée
659874d82c Use byte strings for geohash (#6437)
* Use byte strings for geohash

* Don't take references
2025-04-30 15:50:20 +02:00
Arnaud Gourlay
39b3bbc2c6 Fix CI clippy lint for flush_bench (#6470) 2025-04-30 10:13:49 +02:00
Arnaud Gourlay
21dd277213 Use CollectionResult where possible (#6463) 2025-04-30 09:49:04 +02:00
Luis Cossío
1864e79833 [minor opt] update region gaps in batch when flushing (#6446)
* update region gaps in batch when flushing

* rename to relative -> local

* add flushing bench
2025-04-29 16:22:50 -04:00
LesserPanda
82439deaf2 fix-typo (#6465)
* fix-typo

* Update openapi.json fix-typo
2025-04-29 16:12:31 -04:00
Andrey Vasnetsov
0ea6bc0b25 Faster wal-delta transfer (#6458)
* implement internal batch-update api

* use batch update in wal-delta

* fix ci
2025-04-29 19:31:50 +02:00
Kumar Shivendu
9c723aa480 Fix snapshot test flakiness (#6440)
* Temporarily run fewer tests in CI to reproduce flakiness

* disable other integration test

* log collection topology if request fails

* Run in CI until failure

* update tests

* Catch failures and log

* improve logging for search result comparison flakiness

* fix test

* Simplify test

* Use scroll instead of search and simplify existing code

* Trigger CI

* new util function

* debug again

* print collection topology on mismatch

* wait for deletion of flag after recovery is done

* use wait_for

* Revert integration-tests.yml
2025-04-29 17:10:44 +02:00
Roman Titov
76012bb222 Make segment RocksDB optional, only initialize if required (#6441) 2025-04-29 16:28:58 +02:00
dependabot[bot]
d176a379d7 build(deps): bump io-uring from 0.7.4 to 0.7.5 (#6453)
Bumps [io-uring](https://github.com/tokio-rs/io-uring) from 0.7.4 to 0.7.5.
- [Commits](https://github.com/tokio-rs/io-uring/commits)

---
updated-dependencies:
- dependency-name: io-uring
  dependency-version: 0.7.5
  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-04-29 07:53:19 +02:00
Luis Cossío
6be0c62bb0 Reuse space more in gridstore (#6445) 2025-04-25 18:03:36 -04:00
Tim Visée
71213ec06a Fully replace SmolStr with ecow string (#6427)
* Replace SmolStr with EcoString

* Directly format GeoHash, remove intermediate string
2025-04-25 00:54:55 +02:00