Commit Graph

5465 Commits

Author SHA1 Message Date
Andrey Vasnetsov
b037910c2f Implement logging of slow requests for scroll, facet, count, and retrieve (#7291)
* reorder arguments of scroll_by

* add slow request log for scroll request

* add slow request log for facet request

* add slow request log for count request

* add slow request log for retrieve request

* Remove obsolete clone

* generic implementation of Loggable for Arc

* Refactor scroll by arguments (#7296)

* separate internal scroll operation from the one used by user

* fmt

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-10-27 11:19:25 +01:00
xzfc
6c4ad118d1 Misc edge dev env fixes (#7456) 2025-10-25 10:48:18 +02:00
xzfc
67db9ff241 Expose AcornSearchParams to edge Python bindings (#7455) 2025-10-25 10:46:33 +02:00
xzfc
c1c9eb9ddb Add ACORN-1 search (#7414)
* GraphLayersBase::try_for_each_link

* Add FilteredScorer::score_points_unfiltered

* Add GraphLayersBase::search_on_level_acorn()

* Add SearchParams::acorn API parameter

* Integrate ACORN to HNSW search

* Add doc

* review fixes

* Misc fixes

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-10-24 19:09:21 +00:00
Kumar Shivendu
addb74cc28 Implement logic to replicate points between shards (#7361)
* Allow replicating points between shards

* Add integration test for replicating points between shards

* Drop filter from ForwardProxyShard to for now

* Clean up test

* fix assert failures

* Fix integration test

* Drop reliance on FilteredStreamRecords

* minor improvements
2025-10-24 16:39:04 +05:30
Roman Titov
c2be7855ac Implement edge::Shard::query (#7440)
Co-authored-by: generall <andrey@vasnetsov.com>
2025-10-23 21:39:29 +02:00
Roman Titov
0281cd1952 Cleanups for shard crate and related stuff (#7445) 2025-10-23 20:24:21 +02:00
Roman Titov
bfda43f4c5 Move mmr into shard crate (#7429) 2025-10-23 11:16:20 +02:00
Jojii
f2c012732e Currently running optimizers in Metrics (#7316)
* Currently running optimizer count in metrics

* Clearly state the prerequisites of count_optimizers_running()

* Minor improvements

* improve metric naming
2025-10-23 10:45:59 +02:00
Roman Titov
06e9b26f07 Implement edge::Shard::query_scroll (#7426) 2025-10-21 22:03:54 +02:00
Tim Visée
27cf6e381e Improved segment flush ordering (#7381)
* Re-sort segments on flush, don't use proxy but inner segment state

* Also sort segments when proxying all segments for snapshot

The snapshot operation explicitly flushes segments. We therefore must
satisfy flush ordering there too.

* Add some helpful comments

* Add explicit flush ordering enum for segments

* Minor tweaks

* Fix spelling in comment

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-10-21 16:21:24 +02:00
Andrey Vasnetsov
fd75821c97 rate limit slow request warning queue (#7434)
* rate limit slow request warning queue

* Update lib/collection/src/profiling/slow_requests_collector.rs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fmt

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-21 14:45:12 +02:00
Tim Visée
cafe4aa482 Remove trailing whitespaces (#7435) 2025-10-21 14:05:57 +02:00
Tim Visée
f106430225 Deduplicate iter_internal and iter_ids in ID trackers (#7428)
* Switch from iter_ids to iter_internal

* Remove iter_ids function

* Rename iter_ids_excluding to iter_internal_excluding
2025-10-21 10:25:54 +02:00
Kumar Shivendu
b8ac6741d4 Introduce replicate points action (#7063)
* Introduce new replicate points action

* fmt

* Introduce filter in shard transfer and new transfer method

* clippy & fmt

* Update OpenAPI specs and gRPC API

* Update gRPC docs

* Take from/to shard key as input for replicate_points

* update gRPC docs

* Make filters optional

* fmt

* clippy

* drop FilteredStreamRecords

* Add validation

* update gRPC docs

* Drop FIlteredStreamRecords

* clippy

* update openapi spec

* review fixes

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-10-20 22:45:52 +02:00
Andrey Vasnetsov
29a1197c4e derive Eq for Filter (and underlying types) (#7419)
* derive Eq for Filter (and underlying types)

* fix tests

* use ptr to compare and hash CustomIdChecker

* fix gpu test

* fmt

* use OrderedFloat directly

* post-rebase fixes

* fmt

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-10-20 17:27:03 +02:00
Luis Cossío
41a33167df [relevance feedback] Feedback in CollectionQuery (#7386)
* rename `NamedQuery::new_from_vector` -> `NamedQuery::new

* add feedback query in CollectionQuery. Extract pairs from feedback

* add tests

* fmt

* parameterize num pairs

* rename Linear to Simple

* follow refactor from base branch
2025-10-20 12:05:45 -03:00
Luis Cossío
63dff79edc [relevance feedback] add variant to query enum and internal service (#7368)
* add feedback variant to query enum and internal service

remove internal service Feedback structs for QueryEnum

* rename Linear -> Simple

* follow refactor from base branch

* remove outdated validations

* remove reintroduced code

* use explicit From
2025-10-20 10:52:43 -03:00
Tim Visée
9b0cd22853 Flush segments after proxy (#7427) 2025-10-20 14:41:39 +02:00
Andrey Vasnetsov
75434ca565 implement all point update operation constructors (#7424) 2025-10-20 12:39:01 +02:00
Roman Titov
e01957a4ee Move PlannedQuery and QueryScrollRequestInternal into shard crate (#7417) 2025-10-20 11:52:44 +02:00
Andrey Vasnetsov
56a9610e32 edge filter conversions (#7423)
* initial filter conversion structure

* implement match conditions

* implement range condition

* implement filter condition

* implement geo conditions

* fmt

* finish field conditions

* implement more conditions

* implement nested + expose python exports

* fix spelling
2025-10-20 10:36:12 +02:00
Andrey Vasnetsov
4c95682908 rollback pyvector implementation (#7422) 2025-10-19 19:06:13 +02:00
Tim Visée
b067a7b3f8 Minor Gridstore improvements (#7415)
* Explicitly use C memory representation for Gridstore value pointers

* Inline pure function

* Grow tracker file to be next multiple of two

* In debug builds, panic if getting out of bound point from Gridstore

* Also represent region gaps as C struct

* Remove debug assertion

* Adjust file size test
2025-10-17 13:59:03 +02:00
Andrey Vasnetsov
037c27200f use mutex to ensure sequential segment flushed + await on drop (#7416) 2025-10-17 13:49:55 +02:00
Andrey Vasnetsov
c184ec8833 bump WAL commit (#7413) 2025-10-16 15:20:54 +02:00
eltu
aa0f49798e Full-Text Index ASCII Folding (Normalization) (#7408)
* Add ASCII folding to tokenization process

Introduced an optional ASCII folding feature within the `TokensProcessor` to normalize non-ASCII characters to their ASCII equivalents. Updated tests and documentation to reflect the changes.

* Refactor tokenization code for improved readability and maintainability

Reorganized and reformatted the tokenization module, including `TokensProcessor` initialization and ASCII folding mappings for better clarity. Updated tests to align with the changes.

* Update test cases to reflect optional tokenizer settings changes

Adjusted `ascii_folding`, `lowercase`, and `phrase_matching` settings in tests to `None` where applicable, aligning with updates in tokenizer configuration defaults.

* address review remarks

* fix codespell

* thx coderabbit

* Don't copy tokens that are already ASCII

* Shrink folded string to fit

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
Co-authored-by: timvisee <tim@visee.me>
2025-10-16 13:53:01 +02:00
xzfc
e640a78316 Refactor: merge _search_on_level into search_on_level (#7403)
* Call search_on_level instead of _search_on_level

* Inline _search_on_level into search_on_level

* Inline _search_on_level_with_vectors into search_on_level_with_vectors
2025-10-16 09:30:45 +00:00
Roman Titov
969cc82018 Move ShardQueryRequest into shard crate (#7410) 2025-10-15 16:38:22 +02:00
Luis Cossío
163222930d Feedback query scorer (#7359)
* no manual impl for Serialize and Hash

* new feedback query

* construct query scorer

* simplify formula

* better comment

* make it easier to add other feedback formulas

* rename query -> target

* rename in async raw scorer

* rename formula -> strategy

* better comments

* rename to Simple strategy

* clippyyyyy

* oops, reenable conditional compilation

* Fundamental refactor to precompute pair score

* rename FeedbackScorer -> FeedbackQuery

This type implements `Query` trait, not `Scorer`.`
2025-10-15 10:31:18 -03:00
Roman Titov
6bbe27f8ec Move FormulaInternal into shard crate (#7409) 2025-10-15 15:17:41 +02:00
Andrey Vasnetsov
05ee4d15c3 async update operation (#7407)
* make update worker async

* fix missing async signal send

* Simplify and flatten update worker internals

---------

Co-authored-by: timvisee <tim@visee.me>
2025-10-15 11:58:41 +02:00
Andrey Vasnetsov
0101822998 make flush worker loop async (#7405)
* make flush worker loop async

* await flush worker properly finishes

* simplify flush await

* Improved future select, inline return

---------

Co-authored-by: timvisee <tim@visee.me>
2025-10-15 11:23:43 +02:00
Andrey Vasnetsov
8b2d73ac19 address parallel flushing problem in snapshot creation (#7404)
* address parallel flushing problem in snapshot creation

* explicit flush in test
2025-10-14 18:28:25 +02:00
Andrey Vasnetsov
b8590a9a24 single thread flush (#7388)
* flush all segments in one thread sequentially

* bonus: move flush-related functions into dedicated file

* Minor comment tweaks

* await for flush on segment holder level

* fmt

* Minor improvement, preallocate vector for payload index flushers

* Remove invalid comment

---------

Co-authored-by: timvisee <tim@visee.me>
2025-10-14 16:39:28 +02:00
Andrey Vasnetsov
5abb9ead76 add test for shard recovery after partial flush (#7402)
* add test for shard recovery after partial flush

* force flush with explicit fucntion

* Stop flush worker before explicitly flushing again

---------

Co-authored-by: timvisee <tim@visee.me>
2025-10-14 16:35:48 +02:00
Andrey Vasnetsov
02de826748 fix segment repair on load (#7400)
* fix segment repair on load

* workaround for rocksdb

* Minor comment tweaks

* In in memory ID tracker, unset version first before dropping mapping

* rename cleanup_versions into fix inconsistencies

---------

Co-authored-by: timvisee <tim@visee.me>
2025-10-14 14:06:50 +02:00
xzfc
10ebd1851d Use fs_err::exists and fs_err::tokio::try_exists (#7401) 2025-10-14 09:16:55 +00:00
dependabot[bot]
03c1b607ad build(deps): bump jsonwebtoken from 9.3.1 to 10.0.0 (#7397)
* build(deps): bump jsonwebtoken from 9.3.1 to 10.0.0

Bumps [jsonwebtoken](https://github.com/Keats/jsonwebtoken) from 9.3.1 to 10.0.0.
- [Changelog](https://github.com/Keats/jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Keats/jsonwebtoken/compare/v9.3.1...v10.0.0)

---
updated-dependencies:
- dependency-name: jsonwebtoken
  dependency-version: 10.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* Bump jsonwebtoken to 10.0, use rust_crypto backend

* Fix deprecation warning

---------

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-10-14 10:49:50 +02:00
dependabot[bot]
6e1b7c1040 build(deps): bump half from 2.6.0 to 2.7.0 (#7395)
* build(deps): bump half from 2.6.0 to 2.7.0

Bumps [half](https://github.com/VoidStarKat/half-rs) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/VoidStarKat/half-rs/releases)
- [Changelog](https://github.com/VoidStarKat/half-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/VoidStarKat/half-rs/compare/v2.6.0...v2.7.0)

---
updated-dependencies:
- dependency-name: half
  dependency-version: 2.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Zerocopy feature 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-10-14 10:38:31 +02:00
dependabot[bot]
00ca74f26f build(deps): bump reqwest from 0.12.23 to 0.12.24 (#7394)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.12.23 to 0.12.24.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.23...v0.12.24)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-version: 0.12.24
  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-10-14 10:22:40 +02:00
dependabot[bot]
0731705ab8 build(deps): bump cc from 1.2.40 to 1.2.41 (#7392)
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.2.40 to 1.2.41.
- [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.2.40...cc-v1.2.41)

---
updated-dependencies:
- dependency-name: cc
  dependency-version: 1.2.41
  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-10-14 09:58:47 +02:00
dependabot[bot]
c6b1cda715 build(deps): bump sysinfo from 0.37.1 to 0.37.2 (#7391)
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.37.1 to 0.37.2.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.37.1...v0.37.2)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-version: 0.37.2
  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-10-14 09:46:44 +02:00
dependabot[bot]
662bc35fef build(deps): bump clap from 4.5.48 to 4.5.49 (#7396)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.48 to 4.5.49.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.48...clap_complete-v4.5.49)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.49
  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-10-13 17:20:30 -03:00
dependabot[bot]
64cbe3714f build(deps): bump slog from 2.8.0 to 2.8.2 (#7398)
Bumps [slog](https://github.com/slog-rs/slog) from 2.8.0 to 2.8.2.
- [Release notes](https://github.com/slog-rs/slog/releases)
- [Changelog](https://github.com/slog-rs/slog/blob/master/CHANGELOG.md)
- [Commits](https://github.com/slog-rs/slog/compare/v2.8.0...v2.8.2)

---
updated-dependencies:
- dependency-name: slog
  dependency-version: 2.8.2
  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-10-13 17:19:36 -03:00
dependabot[bot]
d5072d1363 build(deps): bump parking_lot from 0.12.4 to 0.12.5 (#7393) 2025-10-13 20:18:11 +00:00
Kumar Shivendu
c0f580bddd Shard key initial state (#7371)
* Allow specifying initial state while creating shard key

* Dont wait for Active state if initial_state is set

* Generate gRPC docs and OpenAPI spec

* Apply suggestions

* Skip from scheamrs not serde

* Add integration test

* minor suggestions
2025-10-13 17:58:34 +05:30
Tim Visée
b9243c5af4 Forbid peer to join cluster with URI that is already used (#7375)
* Disallow peer to join with URI that is already used

* Add test for rejecting peer join with duplicate URI

* Improve peer rejection logic

* Try to rejoin twice, we expect a consistent result
2025-10-13 12:32:51 +02:00
xzfc
95b4bbf978 Rename HnswConfig::{copy_vectors -> inline_storage} (#7389) 2025-10-13 10:08:06 +00:00
Daniel Boros
3c6f26eced feat: handle 429 properly on infer svc (#7377)
* feat: handle 429 properly

* feat: change to rate limit error

* feat: handle http_date

* chore: remove unsued imports

* chore: make it more readable
2025-10-13 11:04:53 +02:00