Commit Graph

3618 Commits

Author SHA1 Message Date
dependabot[bot]
ff3dcc5a3e build(deps): bump siphasher from 1.0.1 to 1.0.2 (#8088)
Bumps [siphasher](https://github.com/jedisct1/rust-siphash) from 1.0.1 to 1.0.2.
- [Commits](https://github.com/jedisct1/rust-siphash/compare/1.0.1...1.0.2)

---
updated-dependencies:
- dependency-name: siphasher
  dependency-version: 1.0.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>
2026-02-10 07:51:16 +01:00
Andrey Vasnetsov
1ae2070e1c audit logging (#8071)
* initial implementation

* internal logging type

* wrap more places into auth function

* [manual refactor] use &Auth in .toc fucntion - minimise direct .access()

* [manual refactor] fmt

* [manual refactor] remove unannotated .access in creation of snapshots

* [manual refactor] remove unannotated .access in cluster telemetry

* [manual refactor] remove unannotated .access

* [manual refactor] do not log /metrics api access

* [manual refactor] do not run the service if audit logging failed to init

* [manual refactor] make auditable operation names for point and cluster updates

* [manual refactor] remove excess cloning of auth object

* [manual refactor] fmt

* [AI] instead of manual writing into the file, use tracing_appender crate

* [AI] simplify configuration to match internal crate

* fmt

* [manual refactor] cover staging options

* [AI] refactor x-forwarded-for handelling

* [manual refactor] use consts for x-forwarded-for + recover handelling for RFC case in tonic

* Update src/tonic/forwarded.rs

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

* [manual] review fix: use FORWARDED in actix

* [manual] review fix: do not log strict mode checks

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-02-09 19:16:20 +01:00
Luis Cossío
a962a862ac disable multi_threaded_readers_consistent (#8078) 2026-02-09 17:51:44 +01:00
Ivan Pleshkov
138155b15f fix wal replay deadlock in update queue (#8068) 2026-02-09 15:45:50 +01:00
Kyamran Shakhaev
6a5bdc7300 Add unified actix version (#8074) 2026-02-09 12:06:23 +00:00
Ivan Pleshkov
312c373f04 Fix flaky test_wal_replay_loads_pending_to_queue (#8067) 2026-02-09 13:02:20 +01:00
Jojii
3b1496537a Use spawn_blocking for segment locking (#8069)
* Use spawn_blocking for segment locking

* Wrap blocking task in AbortOnDropHandle

* Use single blocking thread for fetching all segment size information

---------

Co-authored-by: timvisee <tim@visee.me>
2026-02-09 12:04:16 +01:00
Andrey Vasnetsov
4437edb775 Weighted rrf (#8063)
* weighted rrf implementation

* test

* fmt

* fix edge

* validate number of sources and number of weights

* do not partial match

* upd schema

* review fixes

* update formula

* remove calcualtions from tests

* update comment, because AI have OCD

* fmt
2026-02-06 19:36:27 +01:00
Jojii
cf4158094b Don't lock SegmentHolder for the entire duration of read operations (#8056)
* Don't lock SegmentHolder during read operations

* Add comment clarifying eager segment allocation

* review fixes

* Remove TODO

* Shorter locking of segment holder in calculate_local_shard_stats

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2026-02-06 11:32:09 +01:00
tellet-q
75ba1de122 Add more stages for shard transfer profiling (#8027)
* Improve stages reporting

* Remove transferring records info from snapshot transfer's comment

* Add detailed profiling for ReshardingStreamRecords

* Address AI review comment

* Remove some nesting

---------

Co-authored-by: timvisee <tim@visee.me>
2026-02-06 10:55:23 +01:00
Luis Cossío
312d708aaa [trififo] seqlock with interior mutability (#8012) 2026-02-05 17:54:32 -03:00
Tim Visée
c033e26cf4 Enable update queue (#8046) 2026-02-05 17:46:32 +01:00
xzfc
6bced54ca1 Chore: promote dependencies to workspace level (#8061)
* Promote `env_logger` to workspace dependency

* Promote `anyhow` to workspace dependency

* Promote `rmp-serde` to workspace dependency

* Promote `tinyvec` to workspace dependency

* Promote `async-trait` to workspace dependency

* Promote `url` to workspace dependency

* Promote `self_cell` to workspace dependency

* Promote `cc` to workspace dependency

* Promote `bitpacking` to workspace dependency
2026-02-05 16:02:28 +01:00
Ivan Boldyrev
56799122b0 Split SegmentEntry into appendable and non-appendable part (#8047)
* Split `SegmentEntry`

Add `ImmutableSegmentEntry` for operations that can be applied to
immutable segments, and make the `SegmentEntry` as it subtrait.

* Rename to `NonAppendableSegmentEntry`

It differs semantically from `ImmutableSegmentEntry` by allowing point
deletion.  Move point deletion to the trait too.

* Fix docstring

* use NonAppendableSegmentEntry where possible

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2026-02-05 15:46:58 +01:00
Ivan Pleshkov
90923e5886 Remove UpdateSignal::Stop (#8050)
* remove UpdateSignal Stop

refactor wal truncation

restart workers even if wal truncation fails

* dont duplicate notification code in update worker

* send manually cancellation token to update worker

* revert stop_update_workers and keep as is

* refactor wal truncation

* are you happy clippy

* Inline breaks into single block

* Remove closure and call directly

* dont recreate channels in config update

* more comments

* debug assert

* fmt

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2026-02-05 15:23:38 +01:00
Arnaud Gourlay
c7438cce9d Attempt to Fix RST_STREAM by draining http2 channels (#8019)
* Fix RST_STREAM by draining http2 channels

* remove controversial duration time for now

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2026-02-05 14:07:48 +01:00
Ivan Pleshkov
510b0c090a Update queue status in metrics and telemetry (#8060)
* update queue status in metrics and telemetry

* fix python tests

* update openapi
2026-02-05 11:37:19 +01:00
Tim Visée
abb270f59a For snapshots directly restored, use default temp path in storage volume (#8059) 2026-02-05 09:29:05 +01:00
Lior.Chen
bc3f9a1c60 feat: Optimize the collection loading process during startup (#8053)
* feat: optimize the collection loading process during startup

* simplify config options

* chore: update config.yaml

* Remove global state

* Disallow zero values

* Remove intermediate map

* Rename ConcurrentLoadConfig to LoadConcurrencyConfig

* Flatten config

* Accept string inputs from environment variables

* Fix test compilation

---------

Co-authored-by: generall <andrey@vasnetsov.com>
Co-authored-by: chenliang <chenliang@chenliangdeMacBook-Air.local>
Co-authored-by: timvisee <tim@visee.me>
2026-02-04 17:35:33 +01:00
Luis Cossío
de3e7c58c1 cfg import behind linux flag (#8058) 2026-02-04 16:25:40 +01:00
Tim Visée
059d093e50 Also specify clone behavior for new facet types in edge (#8055) 2026-02-04 10:53:06 +01:00
dependabot[bot]
ac7e9f905c build(deps): bump pyo3 from 0.27.2 to 0.28.0 (#8034)
* build(deps): bump pyo3 from 0.27.2 to 0.28.0

Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.27.2 to 0.28.0.
- [Release notes](https://github.com/pyo3/pyo3/releases)
- [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pyo3/pyo3/compare/v0.27.2...v0.28.0)

---
updated-dependencies:
- dependency-name: pyo3
  dependency-version: 0.28.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* chore: add skip_from_py_object to accept the new behaviour

* chore: switch to from_py_object

* chore: allow deprecated usage

* fix: import

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Boros <dancixx@gmail.com>
2026-02-04 10:10:00 +01:00
xzfc
5a3dd12e02 Callback-based DenseVectorStorage::for_each_in_dense_batch (#8033)
* Generalized vector offset

* Replace get_batch-like methods with for_each-like methods
2026-02-04 07:06:23 +00:00
Arnaud Gourlay
52e995d78b WAL replay honors applied_seq (#8008)
* WAL replay honors applied_seq

fixes

* add integration test

* restore test after rebase

---------

Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com>
2026-02-03 20:47:57 +01:00
Daniel Boros
039d66fe40 feat/edge-facet-api (#8045)
* feat: add sync facet api

* feat: add facet-tests

* fix: formatting

* chore: remove exact typing

* feat: reduce code duplication

* fix: add missing type def

* fix: serde default value
2026-02-03 18:13:38 +01:00
Andrey Vasnetsov
44ac1f00dc faster segment holder locks (#8007)
* non-locking retrieve

* optimization & write exclusive lock via upgradable_read

* faster segment holder locks debug (#8024)

* fix deadlock

* move LockedSegmentHolder into a dedicated file

* reorder locks for snapshot

* fmt

* upd comments

* Update lib/collection/src/collection_manager/optimizers/segment_optimizer.rs

Co-authored-by: Ivan Boldyrev <ivan.boldyrev@qdrant.com>

* Add UpdatesGuard type wrapper for updates_guard (#8031)

* Initial plan

* Add UpdatesGuard newtype wrapper for updates_guard

Co-authored-by: generall <1935623+generall@users.noreply.github.com>

* Fix linter issue - remove trailing space in doc comment

Co-authored-by: generall <1935623+generall@users.noreply.github.com>

* Remove unnecessary new() method, use tuple constructor directly

Co-authored-by: generall <1935623+generall@users.noreply.github.com>

* fix clippy

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: generall <1935623+generall@users.noreply.github.com>
Co-authored-by: generall <andrey@vasnetsov.com>

* Remove aliassed lifetime

Co-authored-by: Jojii <15957865+JojiiOfficial@users.noreply.github.com>

---------

Co-authored-by: Ivan Boldyrev <ivan.boldyrev@qdrant.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: generall <1935623+generall@users.noreply.github.com>
Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: Jojii <15957865+JojiiOfficial@users.noreply.github.com>
2026-02-03 16:20:57 +01:00
Ivan Pleshkov
2c9de6c4a4 Drop wal from api (#8000)
* Drop WAL from API

Flatten if statement

another approach

review remarks

switch flag back guard

unit test

* review remarks

* review remarks

* test missing records which are not truncated and not applied

* Drop wal from api: don't use applied seq number (#8030)

* Don't rely on applied seq num

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove unused

* Repurpose existing plunger, unset first_skipped in operation branch

* more complicated tests with empty wal

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com>

* review remarks

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-03 15:53:34 +01:00
Jojii
a24377d615 Fix test consistency in random memory id tracker (#8043) 2026-02-03 15:37:43 +01:00
Andrey Vasnetsov
f403f6d00d Streaming snapshot unpacking (#8025)
* download tar

* compute sha256 for stream download

* wip: propagate unpacking into down to the logic, todo: validation

* unpacked snapshot validation

* Minor tweaks

* Fix typo

* validation during unpack

* cancellation token

* update docstring

* remove redundant dep

* Rearrange unpack functions

- Rename `safe_unpack.rs` into `tar_unpack.rs` so it would be listed
  near `tar_ext.rs` in IDEs.
- Replace calls like `ar = open_snapshot_archive(…); safe_unpack(ar, …);`
  with a single call to `tar_unpack_file(…)`.
- Put calls to `Archive::new(); Archive::set_overwrite(false);` inside
  `tar_unpack_reader` (was `safe_unpack`). So, now it is the only place
  that does `set_overwrite`.

* Let clippy complain if tar::Archive::unpack used

* Mock snapshot download URL

Instead of downloading from storage.googleapis.com every time the test
runs, put small snapshot file to the repo.

The snapshot file is created using this command:

    curl -s \
      https://storage.googleapis.com/qdrant-benchmark-snapshots/test-shard.snapshot \
    | tar \
      --delete segments/4ea958d8-0b64-4312-9a53-0cd857e93535.tar \
      --delete segments/65ac6276-8cca-4f5c-b767-9722190cee8b.tar \
      > lib/storage/src/content_manager/snapshots/test-shard.snapshot

File contents:

    $ tar tf lib/storage/src/content_manager/snapshots/test-shard.snapshot
    wal/
    wal/closed-255
    newest_clocks.json
    replica_state.json
    shard_config.json
    
    $ du -sh lib/storage/src/content_manager/snapshots/test-shard.snapshot
    12K	lib/storage/src/content_manager/snapshots/test-shard.snapshot
    
    $ sha256sum < lib/storage/src/content_manager/snapshots/test-shard.snapshot       
    5d94eac5c1ede3994a28bc406120046c37370d5d45b489a0d2252531b4e3e1f2  -

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: xzfc <xzfcpw@gmail.com>
2026-02-03 12:19:18 +01:00
Ivan Boldyrev
984a9e8bd1 Fix gridstore Option unsoundness (#8011)
* Implement `Optional<T>` type

Define a type with the same presumed layout as `Option<T>`, but with defined behavior.

* Make `transmute_*` functions unsafe

The functions `memory::mmap_ops::transmute_*` are inherently unsafe, but
are not marked as are.  Their usage is documented, but it is not always clear
if the code is correct.

* Add `CsrHeader` to resolve another unsoundness

Tuples have no defined layout.
2026-02-03 17:57:09 +07:00
dependabot[bot]
e5d83fa46e build(deps): bump arc-swap from 1.8.0 to 1.8.1 (#8041)
Bumps [arc-swap](https://github.com/vorner/arc-swap) from 1.8.0 to 1.8.1.
- [Changelog](https://github.com/vorner/arc-swap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vorner/arc-swap/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: arc-swap
  dependency-version: 1.8.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>
2026-02-03 10:15:12 +01:00
Anush
446a76318e docs: Add Rust Example For Qdrant Edge (#8020)
Signed-off-by: Anush008 <mail@anush.sh>
2026-02-02 18:18:22 +01:00
Tim Visée
7211d58b77 Apply clippy suggestions (#8029) 2026-02-02 15:11:43 +01:00
Arnaud Gourlay
9f09dbfd3b Update queue info into CollectionInfo (#8010)
* Update queue info into CollectionInfo

* basic test

* fix

* cleaner

* Update lib/collection/src/shards/local_shard/mod.rs

Co-authored-by: xzfc <5121426+xzfc@users.noreply.github.com>

* fix the fix

* rename to op_num

* skip_serializing_if just in case

* first step

* test queue length with staging feature

* gate integration test based on binary feature

---------

Co-authored-by: xzfc <5121426+xzfc@users.noreply.github.com>
2026-01-30 17:23:53 +01:00
Luis Cossío
4c0d55da7b [disk cache] benchmark other in-memory caches (#7953)
* benchmark against other caches

* use cycle

* use an enum for cache names

* make multithreaded bench with rayon

* don't include pregenerated keys in allocation

* improve benches

* improve keys with zipf + scan

* misc improvements
2026-01-29 14:45:37 -03:00
Tim Visée
cbb212ce3b Remove TODOs for assigning clock tags in forward proxy (#8005) 2026-01-28 12:05:08 +01:00
Arnaud Gourlay
5e986e10d3 Persist applied seq at regular interval (#7976)
* Persist applied seq at regular interval

* Error handling

* fix brain fart

* don't reset update_count

* handles explicitly failure to load

* init from WAL instead of zero

* fixes

* try to regenerate file on corruption

* fix

* trust the WAL if higher watermark most likely from a transfer

* use last WAL index & handles file shard lifecycle

* last WAL index is inclusive

* include applied_seq in partial snapshot

* snapshot applied_seq file

* fix

* remove outdated comment

* Describe AppliedSeq structure, it is used for persisting

---------

Co-authored-by: timvisee <tim@visee.me>
2026-01-28 11:11:04 +01:00
Ivan Pleshkov
9f57ecd6af reduce update signal size by optimizing hw (#8003) 2026-01-28 10:27:36 +01:00
tellet-q
00039e1537 Track shard transfer stages and duration (#8001)
* Track shard transfer stages and duration
2026-01-27 15:32:17 +01:00
Ivan Pleshkov
8db893a3b0 Update queue dont keep ops in ram (#7951)
* update queue dont keep ops in ram showcase

* always load operation from WAL

* revert operations buffering

cound only pending in update worker operations

fix typo

use channel size instead of wal index

* remove result expect

* decrease buffering const

* review remarks

* are you happy codespell
2026-01-27 15:18:24 +01:00
Andrey Vasnetsov
5a3793dc63 do not block ToC on in-collection operations by arc-ing collections (#7999)
* do not block ToC on in-collection operations by arc-ing collections

* review suggestion fix
2026-01-27 14:26:06 +01:00
dependabot[bot]
18ef0758ca build(deps): bump sysinfo from 0.37.2 to 0.38.0 (#7994)
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.37.2 to 0.38.0.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.37.2...v0.38.0)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-version: 0.38.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>
2026-01-27 09:43:56 +01:00
Andrey Vasnetsov
81e7ab72fe introduce update_mode parameter for upsert operation to control if we want to insert, update, or upsert (#7963)
* introduce update_mode parameter for upsert operation to control if we want to insert, update, or upsert

* add test

* upd dockstring

* require resharding once all peers have updated version

* use service error

* fix clippy again

* wait for same version before resharding in tests
2026-01-27 00:39:25 +01:00
xzfc
d7a0f2f882 Update GET collections/{}/optimizations (#7946)
* refactor(SegmentOptimizer::name): make it `&'static`

* refactor(TrackerStatus): add is_running()

* refactor: add TrackerSegmentInfo

* feat: rework optimizations endpoint

* feat(collections/{}/optimizations): trim spaces
2026-01-26 18:03:52 +01:00
Andrey Vasnetsov
64040511bc gridstore iter livelock (#7983)
* granular lock for writing and flushing pending updates in gridstore tracker

* avoid grigstore tracker lock in iterator
2026-01-26 11:47:26 +01:00
Ivan Pleshkov
ec7c0beaa6 remove obsolete collection update lock (#7979) 2026-01-25 12:06:07 +01:00
xzfc
ae607ee213 Fix hnsw_incremental_build benchmark (#7978)
* Fix hnsw_incremental_build benchmark

* More docs
2026-01-23 15:48:15 +01:00
Ivan Pleshkov
8a729118a3 Remove ChunkedVectorStorage trait (#7977)
* Remove ChunkedVectorStorage trait

* fix rocksdb feature

* fix multidense rocksdb
2026-01-23 13:01:45 +01:00
Andrey Vasnetsov
f1fb912bbc in ram single mmap file (#7971)
* WIP: introduce new vector store type

* handling of InRamMmap

* fmt

* feature-flag

* fmt

* Use if else

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>

* Update lib/common/common/src/flags.rs

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

* also choose madvise for single-file in-ram-mmap

* simplify generics

* gpu fix

* fix bug

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2026-01-23 11:12:32 +01:00
Roman Titov
1ef06b7fdd Improve SnapshotManifest/SegmentManifest construction (#7961)
* Improve `SnapshotManifest`/`SegmentManifest` construction

* fixup! Improve `SnapshotManifest`/`SegmentManifest` construction

Fix stupidity 😬
2026-01-23 11:09:03 +01:00