Commit Graph

3216 Commits

Author SHA1 Message Date
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
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
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
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
tellet-q
cdae750d0b Log shard transfer abort during consensus recovery (#7373)
* Add log line about aborting transfer during consensus recovery
2025-10-13 08:55:22 +02:00
Roman Titov
e7fe24bb1b More type conversion for Qdrant on Edge Python bindings (#7372)
* Cleanup `edge::Shard::retrieve`

* Cleanup Python errors

* Cleanup `PointId` conversions

* Rename `ids` into `point_ids` in `PyShard::retrieve`

* WIP: Prototype native conversions for more types
2025-10-10 19:56:05 +02:00
Tim Visée
da5e5cd42d In Gridstore, also populate the tracker file (#7385) 2025-10-10 13:15:11 -03:00
Roman Titov
8141173029 Type conversions into native Python types for Qdrant on Edge (#7367)
* Cleanup README.md

* Rename `PyResult` into `Result`

* Rename `interface` module into `types` and simplify imports

`wildcard::goes::brrr::*`

* Add `PointId` conversion

* Add `Payload` conversion

* fixup! Add `Payload` conversion

Avoid cloning `Payload` for output conversion

* fixup! Add `PointId` conversion

Fix example

* review fixes #1: fix uuid parsing, avoid .into, use custom types

* review fixes #2: rewrite point id to avoid chain if

* review fixes #3: allow ot use uuid + remove comment

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-10-09 19:19:56 +02:00
Arnaud Gourlay
a24d380ee0 Investigate flaky snapshot transfer test (#7339) 2025-10-09 10:47:23 +02:00
Arnaud Gourlay
1fcb7a2139 Test continuous snapshot data loss (#7308)
* Continuous snapshot data loss

* assert vector & payload are present
2025-10-08 12:20:44 +02:00
Andrey Vasnetsov
8dd915c0b1 non appendable proxies (#7345)
* WIP: make proxy segment non-appendable

* make deleted points and index changes private to Proxy Segment

* consistently remove empty unused segment from holder on unproxifying and the end of optimization

* remove/fix obsolete test

* Fix comment, some general adjustments

* Also don't remove non-original segments

* Use ahash for map of proxy index changes

* Inline format arguments

* Simplify has point branching

* Assert that proxy flushes to latest wrapped segment version

* make vector deletetion a CoW operation

* relax debug assertions

* Update lib/shard/src/proxy_segment/mod.rs

* fix test_partial_snapshot_empty

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
2025-10-08 00:19:41 +02:00
Arnaud Gourlay
a0645c7319 Use AHash for ShardId HashMap (#7357) 2025-10-07 12:11:53 +02:00
dependabot[bot]
ec6089c0ca build(deps): bump flate2 from 1.1.2 to 1.1.4 (#7349)
Bumps [flate2](https://github.com/rust-lang/flate2-rs) from 1.1.2 to 1.1.4.
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.1.2...1.1.4)

---
updated-dependencies:
- dependency-name: flate2
  dependency-version: 1.1.4
  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-07 09:35:14 +02:00
Andrey Vasnetsov
96821e0376 edge retrieve api (#7344)
* refactor: move RecordInternal into Shard crate

* refactor: move retrieve_blocking into Shard crate

* implement retrieve method + move some structures into dedicated files
2025-10-06 19:59:43 +02:00
Luis Cossío
33bd50e72d Change score of query-less prefetch to 1.0 (#7347) 2025-10-06 14:47:15 -03:00
Roman Titov
4f3855a32c WIP: Extend Qdrant Edge Python bindings (#7343) 2025-10-03 13:14:35 +02:00
Roman Titov
1004b93ae5 Python bindings for Qdrant on Edge (#7312)
* Qdrant Edge Python binding 🐍⛓️💥

* fixup! Qdrant Edge Python binding 🐍⛓️💥

Fix example + cleanup

* review: move QueryEnum + mark search as deprecated

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-10-03 12:48:26 +02:00
Arnaud Gourlay
159c7ffdb3 Force flush when taking a snapshot to capture on-going batches (#7342) 2025-10-02 13:33:15 +02:00
Arnaud Gourlay
ce16b27b41 Tone down optimizer logging (#7337) 2025-09-30 16:12:16 +02:00
dependabot[bot]
ae42fee8c1 build(deps): bump object_store from 0.12.3 to 0.12.4 (#7331)
Bumps [object_store](https://github.com/apache/arrow-rs-object-store) from 0.12.3 to 0.12.4.
- [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.3...v0.12.4)

---
updated-dependencies:
- dependency-name: object_store
  dependency-version: 0.12.4
  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-09-30 14:26:08 +02:00
xzfc
23a0a0e8b8 DiffConfig: replace serde-based impl with explicit impl (#7294)
* refactor: replace serde-based DiffConfig implementation with macro

* refactor: macroexpand impl_diff_config

* refactor: drop `merge` dependency as unused
2025-09-29 18:55:50 +00:00
xzfc
780d406ff8 Add CollectionInfo::warnings field (#7293)
* refactor: swap DiffConfig parmeters

was: diff.update(&config)
now: config.update(diff)

* refactor: introduce DiffConfig::update_opt

* feat: add CollectionInfo::configuration_status field

* rename ConfigurationStatus to CollectionWarning
2025-09-29 18:17:03 +00:00
Roman Titov
a32810c222 Cleanup fs-err error messages in Edge (#7325) 2025-09-29 16:39:06 +02:00
Arnaud Gourlay
df527fe18a Fix linting for Edge with fs-err (#7324)
* Fix linting for Edge with fs-err

* fix consistency use fs_err as fs
2025-09-29 16:10:42 +02:00
Roman Titov
895318913a Qdrant on Edge prototype (#7170) 2025-09-29 15:01:44 +02:00
xzfc
a0d62330c7 Use fs-err (#7319) 2025-09-29 12:47:10 +00:00
Andrey Vasnetsov
11135e6324 smaller update batch size (#7320)
* make update batch smaller to prevent long blocks

* limit vector update operations as well

* limit update chunk for point upsertion

* Fix typo

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-09-29 14:30:27 +02:00
Andrey Vasnetsov
7d7f8a3118 Use former scroll_lock to prevent parallel updates during snapshot (#7306)
* separate snapshot-related functions into a new file

* move out snapshot-related function in local shard

* move snapshot test to local shard level

* move snapshot_all_segments and proxy_all_segments_and_apply to local shard

* use former scroll update lock to prevent snapshot operations overlapping with updates

* review fixes: rename all scroll_lock, use write lock for unproxy instead of read
2025-09-25 17:10:43 +02:00
Ivan Boldyrev
ad31c428e3 Fix Tokio race condition in benchmarks (#7311)
Shutdown `shard` explicitly at the end of benchmark to avoid error

```
A Tokio 1.x context was found, but it is being shutdown.
```

Co-authored-by: Ivan Boldyrev <ivan.boldyrev@qdrant.com>
2025-09-25 16:06:19 +02:00
Arnaud Gourlay
beaea63a7c Fix incorrect delete version on update (#7303) 2025-09-25 11:02:17 +02:00
Arnaud Gourlay
bf8e86fb66 Add debug assertion for deleted version on proxy (#7300)
* Fix applying stale delete operation on proxy

* correct init of flag

* Update lib/shard/src/proxy_segment/mod.rs

Co-authored-by: Tim Visée <tim+github@visee.me>

* Update lib/shard/src/proxy_segment/segment_entry.rs

Co-authored-by: Tim Visée <tim+github@visee.me>

* Update lib/shard/src/proxy_segment/segment_entry.rs

Co-authored-by: Tim Visée <tim+github@visee.me>

* rollback unecessary check

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-09-24 15:01:13 +02:00
Arnaud Gourlay
688651bacc Fix corruption due to concurrent update during snapshot (#7298) 2025-09-24 14:59:13 +02:00