626 Commits

Author SHA1 Message Date
qdrant-cloud-bot
ec7d7d2c7e docs: make dev branch requirement more prominent for contributors (#8581)
Contributors frequently open PRs against master instead of dev.
Add prominent callouts and a root-level CONTRIBUTING.md so the
branch requirement is visible at every step of the contribution flow.

Made-with: Cursor

Co-authored-by: Cursor Agent <agent@cursor.com>
2026-04-01 13:56:29 +02:00
xzfc
0b0df145b3 Drop RocksDB (#8529)
* Skip broken tests

* Add rocksdb dropper

This is a temporary tool. It will be removed later in this PR.

* [automated] Drop rocksdb

This commit is made by running tools/rocksdb/drop.sh

* Touch-up after ast-grep

The previous automated commit removed items, but not their comments.
Also, some blocks are left with only one item.
Also, ast-grep can't handle macros like `vec![]`.

This commit completes the job.

* Remove RocksDB dropper

* Remove mentions of rocksdb feature in CI

* Fix clippy warnings

These `FIXME` comments added previously in this PR by ast-grep by
"peeling" cfg_attr like this:

    -#[cfg_attr(not(feature = "rocksdb"), expect(...))]
    +#[expect(...)] // FIXME(rocksdb): ...

This commit removes these allow/expect attributes and fixes clippy
lints.

* Remove leftover rocksdb-related code

Removed:
- Cargo.toml: rocksdb cargo feature flag and dependencies.
- code: rocksdb-related items that was not under feature flag.
- flags.rs: rocksdb-related qdrant feature flags.

Disabled:
- Some benchmarks because these do not compile now.

* Print warning if rocksdb leftovers found in snapshots

* Remove Clone from tokenizer

* Regenerate openapi.json
2026-03-31 18:08:39 +00:00
Arnaud Gourlay
70c2b58ae3 Fix openapi min timeout (#8515) 2026-03-27 12:10:27 +01:00
Bhagirath Kapdi
fb704e5d13 Feature/strict mode search max batchsize (#8469)
* feat: add search_max_batchsize to strict mode config

* added test case for search_max_batchsize

* Changes for fixing CI issue dure openapi

* Modify check_strict_mode_batch

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2026-03-26 16:26:09 +01:00
Excellencedev
3230f1d952 Implement Per collection metrics for Promethus (#8214)
* Implement Per-Collection Prometheus Metrics

* Update config/config.yaml

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

* Update tests/per_collection_metrics_test.sh

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

* Update tests/per_collection_metrics_test.sh

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

* fix ci

* comment

* Update tests/per_collection_metrics_test.sh

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

* adress revew

* fix: linter

* refactor: cardinality limit, anonymize fix, cleanup

- Add max_per_collection_metrics config (default 256) to bound
  per-collection label cardinality
- Fix anonymize: strip per_collection_responses entirely instead of
  leaking hashed collection names
- Move CollectionName into requests_telemetry, remove
  telemetry_context.rs
- Add unit tests for cardinality limits
- Add integration test assertions for default mode
- Regenerate OpenAPI spec
- Document why internal gRPC doesn't attach CollectionName

* avoid cloning

* fix: address pr reviews

* fix: linter

* fix: linter

* feat: enforce {name} in actix api

* chore: remove empty line

* feat: add actix pre-commit hook

* feat: potential enforce tonic collection name

* feat: use proc_macro instead

* feat: use collection_name instead of name

* feat: add tonic telemetry tests

* fix: linter

* fix: linter

* chore: remove unneccessary clone

* fix: use collection_name everywhere

* fix: python tests and openapi

* chore: simplify collection_name tests

* actix collection_name enforcign: use relative path in test + avoid grep

* fix: remove macro

* chore: add some comment to telemetry_wrapper

* fix: clippy

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Daniel Boros <dancixx@gmail.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2026-03-23 15:19:02 +01:00
Jojii
c015b86515 Add deferred point count to UpdateQueueInfo (#8414)
* Add deferred point count to UpdateQueueInfo

* Hide if prevent_unoptimized is false

* Clippy

* Openapi

* Iterate over appendable segments only

* Only calculate deferred point count if prevent_unoptimized is true

* Rebase fixes

* Codespell
2026-03-19 15:27:23 +01:00
Jojii
356040312b Correct calculation of deferred point counts (#8366)
* Don't account for deferred points in some places

# Conflicts:
#	lib/collection/src/shards/local_shard/scroll.rs

* Add in QueryContext

* Cover more places

* Coderabbit review remarks

* Properly count amount of deleted deferred points (#8386)

* Properly count amount of deleted deferred points

* Prevent double-counting of the same point

* Remove hints to estimations

* Properly handle counts in ProxySegment

* Add tests and fix deleted point count issue

* Adjusts tests + fix issues

* Separte fields for deferred points in telemetry (SegmentInfo)

* Remove deferred_points_count()

* openapi

* Fix test by manually calculating visible points

* Adjust ProxySegment test to revertion of SegmentInfo

* Throw error if collection was not found in telemetry (e2e Test)

* Update lib/segment/src/segment/segment_ops.rs

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

* Make new fields in API optional

* Don't take range if no deferred point exist

* Review remarks

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2026-03-19 11:33:09 +01:00
qdrant-cloud-bot
33ed0dac9f Propagate deferred_internal_id into SegmentInfo and telemetry (#8382)
Add `deferred_internal_id` field to `SegmentInfo` so it is exposed
through segment telemetry. The field is optional and skipped from
serialization when `None`. It is excluded from anonymization via
`#[anonymize(false)]`.

Made-with: Cursor

Co-authored-by: Cursor Agent <agent@cursor.com>
2026-03-13 12:31:19 +01:00
tellet-q
c0bfc21754 Enable heap profiling in pyroscope (#8371)
* Start heap profiling if MALLOC_CONF set

* Update doc
2026-03-13 11:45:30 +01:00
Daniel Boros
d4cb6a58d9 feat/edge segment opt (#8224)
* feat: add edge shard optimize

* feat: refactor edge optimize logic

* chore: remove unused &self

* feat: add more tests

* fix: linter

* fix: missing threshold prop

* fix: local nightly version

* fix: linter

* fix: linter issues

* fix: use of explicit from

* feat: add some notes

* fix: feature_flags call once

* [manual] review refactor

* fix:
- default_segment_number -> move shard
- rename: default_hnsw_config -> hnsw_config
- infer existing hnsw_config

* feat: add optimize to python

* feat: add python optimize example

* feat: add hnsw config load tests

* fix: linter

* feat: make unified build config

* fix: linter

* fix: openapi definition'

* fix: review comments

* fix: remove mut self & reset_temp_segments_dir

* fix: linter

* review: rename for simpler public name + use explicit strucuture deconstruction

* clipy

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2026-03-06 18:47:15 +01:00
qdrant-cloud-bot
d7ad2d45f7 fix: codespell 2.4.2 - pre-selected -> preselected, pre-select -> preselect (#8303)
* fix: codespell 2.4.2 - pre-selected -> preselected, pre-select -> preselect

Fixes CI failure with codespell 2.4.2 which flags hyphenated forms.
Updated in: types.rs, query/mod.rs, qdrant.rs, points.proto

Made-with: Cursor

* chore: regenerate OpenAPI spec (tools/generate_openapi_models.sh)

Updates oversampling description to use preselected spelling.

Made-with: Cursor

---------

Co-authored-by: Cursor Agent <agent@cursor.com>
2026-03-06 11:47:16 +01:00
tellet-q
ea0455600c Bump pyroscope version to lib-1.0.2 (#8282)
* Bump pyroscope version to lib-1.0.2

* Provide doc with pyroscope configuration
2026-03-03 16:03:26 +01:00
Andrey Vasnetsov
ab6cb8e467 missing timeout for payload index ops (#8176) 2026-02-19 10:39:50 +01:00
Andrey Vasnetsov
6e79f8bf02 Untagged Enum for FeedbackStrategy (#8171)
* [manual] make untagged enum for consistent API for FeedbackStrategy

* add #[validate(nested)]

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2026-02-18 16:55:47 +01:00
Andrey Vasnetsov
345621f447 Expose shard snapshot API (#8132)
* [AI] generate openapi schema for stream download of shard snapshot

* bump number of APIs

* cover API with access test

* fix test

* fix test
2026-02-16 13:34:44 +01:00
generall
72cc67421b add missing timeout parameter for delete points API 2026-02-15 16:11:07 +01:00
Arnaud Gourlay
5ffc6a45a8 Remove update queue opnum from CollectionInfo (#8127) 2026-02-13 17:36:54 +01:00
Andrey Vasnetsov
171b7cffba distributed optimization info (#8120)
* [AI] initial implementation

* [AI] review fixes

* [manaul] some small fix

* [AI] fix issue about serializing optional fields

* upd schema

* [manual] review fixes

* [manual] only ask updatable replicas about optimizations
2026-02-13 13:58:17 +01:00
Andrey Vasnetsov
9735bf7bd3 Fix failed requests count reporting (#7944)
* add grpc status into grpc meterics similar to rest

* rm *_responses_fail_total metric

* upd openapi defs for grpc
2026-02-11 18:17:26 +01:00
Andrey Vasnetsov
78853ed47c RFC: guideline for AI contributions (#8076) 2026-02-11 18:03:56 +01:00
Luis Cossío
a43780941b [relevance feedback] add rest and grpc interfaces (#7399)
* add rest and grpc interfaces

Also handle inference for this query

* follow refactor from base branch

* renaming from Ms Cooper

* get started on validation testing

* more validations

* test equivalence with query when less than 2 feedback elements

* rename feedback query to relevance_feedback query

* fix extraction of context pairs

* rename feedback vector to example

* make coderabbit happier

* upd test

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2026-02-11 16:05:11 +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
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
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
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
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
xzfc
92b8913084 Enforce segment UUIDs (#7958)
* Swap docstrings for segment_ids/segment_uuids

Terse internal docs, detailed user-facing docs, not vice versa.

* Enforce segment UUIDs

* Export upcoming segment UUID to telemetry

* Add `optimize_for_test` wrapper

* Tune log message

Reason: the UUID is now guaranteed.

* Improve argument naming/docs
2026-01-21 15:43:32 +00:00
Kumar Shivendu
9d71b021ab Expose segment UUIDs in telemetry response (#7735)
* Add segment ID in telemetry response

* Migrate optimization log segment IDS to use UUIDs

* fmt

* clippy

* Bring back proxy segment SegmentEntry impl

* update openapi spec

* Bring back segment ID

* update comment

* Precompute segment uuid from filesyste while creating segment

* Update return types

* Update OpenAPI spec

* remove segment_ prefix from uuid field and use inline block

* Update OpenAPI spec

* Trigger CI

* clippy

* Improve comments to differentiate between segment id and uuid

* Remove duplicate function that shadowed segment entry function

---------

Co-authored-by: timvisee <tim@visee.me>
2026-01-20 13:59:22 +01:00
Luis Cossío
b4c9df1f3f [cluster telemetry] Include shards information (#7886)
* make some existing fields optional

particularly, RemoteShardTelemetry's `searches` and `updates`, and
LocalShardTelemetry's `optimizations`

* Include shards information in cluster telemetry

* upd openapi

* nits

* only include partial snapshot info if non-empty

* fixes
2026-01-19 11:34:37 -03:00
Andrey Vasnetsov
b94a13fd6c implement a new configuration for read fan-out delay (#7929)
* implement a new configuration for read fan-out delay

* upd schema

* Update read_fan_out_delay_ms comment

---------

Co-authored-by: timvisee <tim@visee.me>
2026-01-19 14:38:54 +01:00
xzfc
76944fbb6e Expose planned optimizations in API (#7784)
* Expose pending optimizations in API

* Address review comments
2026-01-15 21:31:31 +00:00
Andrey Vasnetsov
921b1ce83d Prevent unoptimized updates (#7643)
* wip: wait for optimization before applying update

* implement api parameter

* nits

* fix deadloack when no optimizers are running

* release handle mutex

* Derive PartialEq

* Remove unused function

* fix missing kb conversion in threshold

* Update lib/api/src/grpc/proto/collections.proto

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

* sync comment change

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
2026-01-14 16:37:03 +01:00
Andrey Vasnetsov
46e7fc1e39 report resharding enabled flag (#7895)
* report if resharding is enabled in telemetry

* fmt
2026-01-11 23:01:07 +01:00
Sapphire
a494452524 Add enable_hnsw option for payload field schema (#7887)
* feat: Add enable_hnsw option for payload field indexes

Add optional enable_hnsw parameter to all payload index types to control
whether additional HNSW graph links are built for each indexed field.

- Add enable_hnsw field to all 8 payload index param types
- Update gRPC proto definitions and conversions
- Update OpenAPI schema
- Modify HNSW graph builder to respect enable_hnsw flag
- Add enable_hnsw() helper methods to PayloadSchemaParams and PayloadFieldSchema
- Update all tests to include new field (default: None)

When enable_hnsw is true and payload_M > 0, additional HNSW links will
be built for the payload field. Default value is true for backward compatibility.

* Fix Some format problems

* fix: address comment problem

---------

Co-authored-by: EC2 Default User <ec2-user@ip-10-78-171-148.ec2.internal>
2026-01-09 11:39:44 +01:00
Daniel Boros
1cbf297f9e feat/shard-ops-timeout (#7750)
* feat: add shard-ops timeout

* feat: add shard-ops timeout

* feat: add missing timeout

* fix: format

* fix: type serialization

* fix: bad wal flush logic

* feat: add seperate wait_time

* fix: linter issues

* fix: linter

* chore: make select more readable

* fix: linter issues

* chore: remove comment

* chore: adjust comment

* chore: update definition

* chore: remove extra wait_timeout -> make timeout global

* chore: remove wait_timeout from point_ops

* chore: remove wait_timeout from grpc

* refactor: make shard_ops more readable

* chore: remove timeout from update_all

* feat: propagate wait_timeout error

* fix: clippy recommendation

* chore: update wait timeout

* refactor: update merge_successful_update_results

* fix: tests inconsistency

* fix: revert global ord, partialord for UpdateStatus

* fix: integration test

* fix: res ingoring

* fix: review requests

* fix: clippy

* chore: revert back futures unordered

* fix: resolve response status

* force timeout for remote operations

* fix: pr reviews

* fix: switch to duration

* Bump OpenAPI spec

* feat: add serde_as

* fix: timeout statu condition

* Minor tweaks

* Use tokio timeout directly rather than deadline

* Revert schema generator permissions

* Remove obsolete semi-colon

---------

Co-authored-by: generall <andrey@vasnetsov.com>
Co-authored-by: timvisee <tim@visee.me>
2026-01-09 10:24:45 +01:00
Luis Cossío
7dbb994f6f [cluster telemetry] Include peers versions (#7848)
* wrap details in another struct, less Options

* include version in peers info

* update openapi

* include app telemetry in internal service

* move debug assertion after check
2026-01-08 14:35:31 -03:00
tellet-q
c0b70f1eae Add a test for recovery after kill during Partial (#7762)
* Add a test for recovery after kill during Partial

* Address AI review

* simplify test

* Merge pull request #7829

* introduce a new state

* switch to ManualRecovery for user-initiated snapshot operations

* fmt

* fix test and regen api

* test fix: instead of force recovery on update failed snapshots now re…

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2026-01-02 14:33:47 +01:00
Luis Cossío
85a5b61b98 [cluster telemetry] Expose endpoint (#7729)
* expose cluster telemetry endpoint

* add endpoint to openapi

* add jwt test

* remove dead_code expectation

* fix consistency check

* fix jwt access test

* use response(reference(..)) in openapi
2025-12-29 09:37:38 -06:00
Luis Cossío
e12fb6f856 [cluster telemetry] Aggregate telemetries from peers (#7696)
* aggregate telemetries

* upd openapi

* expect dead code

* Pick just the highest telemetry

* Tweak transfer selection

---------

Co-authored-by: timvisee <tim@visee.me>
2025-12-23 12:10:05 -06:00
Luis Cossío
64c806d8aa [cluster telemetry] Internal service conversions (#7631)
* implement conversions

* clippy

* rename `ReshardStage` -> `ReshardingStage`

* impl conversions to grpc

* upd response in proto

* convert TelemetryData

* add peer info

* upd openapi

* add conversion from TelemetryData to PeerTelemetry

* review nit

* re-style

* make `method` optional

* change comments to reference `ReshardingStreamRecords`

* missing nits
2025-12-23 11:00:25 -06:00
Tim Visée
f988eb46c5 Add security caution banner to quick start command (#7815)
* Show simple security banner in quick start guide

* Swap sentence

* Refer to new secure your instance section

* Shorten text to fit on single line
2025-12-23 17:29:57 +01:00
tellet-q
2ae05890c5 Move test dependencies to tests (#7793)
* Move pyproject and uv.lock to tests folder

* Make tests working-dir agnostic

* Fix test

* Address review
2025-12-17 15:50:28 +01:00
Tim Visée
b0bb7ef604 Migrate Python to uv (#7790)
* Move pyproject.toml to root

* Migrate pyproject.toml from Poetry to uv

* Update GH workflows

* Update test script, doc and nix to use uv

* Use latest uv

* Fix uv.lock

* Cleanup shell.nix

* Cleanup

- Explicit `uv sync` is not required, `uv run` will install deps
  automatically.
- We don't provide a python package, so the `[build-system]` section
  is not needed.

* Fix UV_VERSION inconsistency

---------

Co-authored-by: tellet-q <elena.dubrovina@qdrant.com>
Co-authored-by: xzfc <xzfcpw@gmail.com>
2025-12-16 16:45:13 +01:00
Daniel Boros
69db4c56e7 feat/update-timeout (#7694)
* feat: add timeout to update params

* feat: update timeout params

* feat: add timeout for grpc

* fix: add missing timeout params

* fix: clippy warnings

* feat: update openapi definition

* chore: format

* fix: redoc master.json

* feat: add missing timeout to grpc api

* fix: missing timeout

* chore: update comments
2025-12-10 13:37:01 +01:00
xzfc
77c71712db Indexing progress (#7625)
* Add progress_tracker.rs

* Pass progress tracker around

* Populate progress tracker with actual data

* Expose progress on `/collections/{name}/optimizations` endpoint
2025-12-09 00:15:36 +00:00
AMIR
4f13b994e3 Add list shard keys API (#7615) 2025-11-28 21:50:09 -03:00
Arnaud Gourlay
adc3bb8540 Fix Openapi schema for DELETE issues (#7634) 2025-11-28 14:50:34 +01:00
Arnaud Gourlay
82929710fd Add timeout to cancel metrics and telemetry calls (#7579)
* Add timeout to cancel metrics and telemetry calls

* relax constraints

* Configure timeout default in OpenAPI schema

---------

Co-authored-by: timvisee <tim@visee.me>
2025-11-25 12:56:05 +01:00
Tim Visée
fca10199b4 Actively migrate away from RocksDB for vector/payload storage and index (#7551)
* Actively migrate away from RocksDB for vector/payload storage and index

* Update OpenAPI spec
2025-11-18 11:18:46 +01:00