Commit Graph

37 Commits

Author SHA1 Message Date
Roman Titov
e01957a4ee Move PlannedQuery and QueryScrollRequestInternal into shard crate (#7417) 2025-10-20 11:52:44 +02:00
Roman Titov
969cc82018 Move ShardQueryRequest into shard crate (#7410) 2025-10-15 16:38:22 +02:00
Roman Titov
6bbe27f8ec Move FormulaInternal into shard crate (#7409) 2025-10-15 15:17:41 +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
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
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
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
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
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
Andrey Vasnetsov
e86d60e6b0 slow requests log (#7188)
* wip: generalization trait for queries

* implement generalization for point operations

* fmt

* log priority queue

* wip: SlowRequestsListener

* fmt

* fix clippy

* simplify generalization

* fmt

* implement collection of requests profiles for update API

* implement API for viewing slow requests log

* add collection name to update worker

* add datetime to log

* fmt

* probabilistic counter of unique requests

* rename

* compute hash before converting into json value

* move logable out of generalizable

* fmt

* log query request

* fmt

* some fixes

* move measurement into local shard

* fmt

* upd openapi (not important)

* For enum variants, has discriminant

* Make SearchParams Copy

* Hash 0.0 and -0.0 the same

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

* Correctly hash enum variants and float values

* Hash through ordered float instead

* Fix priority queue not keeping longest request for hash

* SearchParams implements Copy

* Fix clippy warning

* Add unordered_hash_unique

* skip serialization if none

* Use OrderedFloat for hashing a float

* Use OrderedFloat for hashing a float

* only log updates if they are performed

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: xzfc <xzfcpw@gmail.com>
2025-09-19 19:59:25 +02:00
Arnaud Gourlay
de19cb442e Fix non visible points during snapshots (#7248)
* Fix non visible points during snapshots

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

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

* code review from mr.rabbit

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-09-12 18:40:09 +02:00
Jojii
1e1d683391 Bump segment version on {delete,update,upsert}-by-filter requests (#7157)
* Bump segment versions on *-by-filter operations to acknowledge WAL

* Assert exactly one segment with the new operation version

* Review remarks

* Separate segment version number to not affect partial snapshots

* Adjust unit test

* Remove old bump_segment_version implementations

* Clarify max_persisted_segment_version_overwrite in flush_all

* Move trait implementations - Clippy

* Apply segment bumping to all *-by-filter functions

* Remove AtomicOptionU64

* Update function name and comments

* Remove max condition, start with overwrite value

* Add assertion, can never have zero segments

* Make max_persisted_segment_version_overwrite monotonic with fetch_max

---------

Co-authored-by: timvisee <tim@visee.me>
2025-09-05 14:29:14 +02:00
Arnaud Gourlay
dd30fce77f Fix missing REST API Filter validations (#7218) 2025-09-05 13:53:18 +02:00
Andrey Vasnetsov
852c58e689 make sure that grpc::Vector can always use new format (#7185)
* make sure that grpc::Vector can always use new format

* specify target version for ToDo

* Update lib/api/src/conversions/vectors.rs

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-09-05 13:13:06 +02:00
Tim Visée
e1a9cb57ca Add comment on why we do/don't share deleted points in proxies (#7209) 2025-09-04 14:27:28 +02:00
Tim Visée
ac1914227f Unit test with proxy that propagates older delete to wrapped segment (#7208)
* Add unit test with proxy that propagates older delete to wrapped segment

* Link to pull request

* Disable faulty debug assertion, replace with comment noting semantics

* Minor tweaks

* Point version check in optimizer makes sense, assert no double segment
2025-09-04 14:25:48 +02:00
Arnaud Gourlay
60de32949e Chain nested locks for proxy segments (#7196)
* Chain nested locks for proxy segments

* Remove get_cloned function on locked segment

---------

Co-authored-by: timvisee <tim@visee.me>
2025-09-02 12:54:12 +02:00
Arnaud Gourlay
5c6ccf50a5 Fix duplicate ids in upsert_points (#7194) 2025-09-01 15:29:08 +02:00
Tim Visée
bb51da71ea Use locked segment by reference without cloning Arc (#7176)
* Use locked segment by reference without cloning Arc

* Remove unnecessary clone

* Return list of lock references
2025-08-29 13:26:51 +02:00
Arnaud Gourlay
71a8d96372 Fix potential deadlock in ProxySegment all_vectors (#7172)
* Fix potential deadlock in ProxySegment all_vectors

* Add comment

---------

Co-authored-by: timvisee <tim@visee.me>
2025-08-29 11:06:10 +02:00
Roman Titov
126a3cf558 Move CoreSearchRequest and QueryEnum from collection into shard crate (#7169) 2025-08-29 10:15:58 +02:00
Roman Titov
6111bd2634 Move segments_updater from collection into shard crate (#7163) 2025-08-28 15:01:54 +02:00
Roman Titov
6fa24e1ee3 Move SerdeWal from collection into shard crate (#7146) 2025-08-26 16:27:35 +02:00
Arnaud Gourlay
0781ea8893 Segment holder has deterministic segment iteration (#7131) 2025-08-25 15:40:21 +02:00
Arnaud Gourlay
db2489ba9f Test for segment double proxies (#7127) 2025-08-25 14:20:33 +02:00
Roman Titov
bfdc779203 Move SegmentHolder into shard crate (#7115) 2025-08-22 12:39:06 +02:00
Tim Visée
e02d3dcb38 In proxy segment, don't return deleted point versions (#7109)
* In proxy segment, don't return deleted point versions

More specifically, don't return a point version from the wrapped segment
if that point is already marked for deletion within the proxy.

* Do get wrapped segment point version if it's newer than soft delete

* Flatten function
2025-08-21 15:48:18 +02:00
Roman Titov
5d826c583d Move PayloadIndexSchema into shard crate (#7108) 2025-08-20 18:58:03 +02:00
Roman Titov
60e0c07b0a Move ProxySegment from collection into shard crate (#7093) 2025-08-19 14:01:43 +02:00
Roman Titov
4bcb21b4b7 Cleanup collection::operations and shard::operations modules (#7064) 2025-08-18 16:26:06 +02:00
Roman Titov
13b05d18a3 Extract CollectionUpdateOperations into separate shard crate (#7054) 2025-08-18 11:48:02 +02:00