25 Commits

Author SHA1 Message Date
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
Tim Visée
57ad76db98 Disable RocksDB features in local development builds (#7552)
* Disable rocksdb compile time feature by default

* Also disable RocksDB feature in segment crate

* Enable RocksDB feature in all CI builds

* Remove extra job for testing non-RocksDB build, it's the default now

* Keep RocksDB structures in generated OpenAPI schema

* Fix obsolete --workspace flag breaking builds with explicit features

* Also build including RocksDB in e2e tests on CI
2025-11-25 17:29:50 +01:00
Arnaud Gourlay
ae857340ed Do not build schema_generator by default (#5482) 2024-11-19 16:46:02 +01:00
xzfc
b87e6d2bdd Improve tools/*.sh (#4365)
* Speedup tools/generate_openapi_models.sh

* Improve tools/generate_grpc_docs.sh
2024-05-31 09:51:37 +00:00
xzfc
3ad1528ebe Use /usr/bin/env bash in shebangs (#3570) 2024-02-09 11:42:29 +01:00
Andrey Vasnetsov
74de1483be Shard key create confirmation (#3027)
* create dedicated API for creating shards with explicit avait on the consensus

* fmt

* update api definitions
2023-11-16 15:58:32 +01:00
Andrey Vasnetsov
326ef54664 openapi definitions for shard shashots API (#2571)
* openapi definitions for shard shashots API

* review fixes
2023-09-04 14:54:08 +02:00
Luis Cossío
e90a03e00b Group by key (#1768)
* test: test must_not is_null

* vcs: ignore vscode files

* feat: group-by initial implementation

* cargo fmt

* refactor: same request behavior on reco and search

* refactor: get rid of RefCell

* refactor-fix: correct hashmap keys, and early stops

* chore: small improvements

* feat: groups aggregator

* fix: pull changes from other files

* cargo fix

* cargo fmt

* docs: edit docstrings

* allow dead code (while the complete feature is beint built)

* chore: restructure

* feat: introduce GroupKey, minor other improvements

* cargo fmt

* chore: specify aggregator visibility

* fix: oops, leaking "private" type

* refactor-fix: restructure and refactor group_by

* cargo fix

* fix: don't panic when there is no group-by field

* remove print statements

* amend: `>=`  -> `==`

* perf: remove double clone

* chore: sync aggregator from other branch

* chore: cleanup print statemets

* test: ignore big tests

* cargo fmt

* refactor: add early stop when the groups have been filled, improve code

* chore: sync aggregator, remove print from test

* refactor: consider shard_selection, improve collection_by_name handling

* feat: add bucketing to table of content

* refactor: better errors, improve tests

* test: add integration tests

* feat: add endpoints

* refactor: introduce ScoredPoint wrapper, restructure types

* sync aggregator

* edit internal grouping visibility

* feat: group_by internals

* cargo fmt

* cargo fmt

* refactor: turn inner fn into closure

* test: fix test to support new vector output representation

* feat: wire up grouping with actix

* expose grouped_by field

* fix: change output group format

* feat: wire up openapi

* fix: finish wiring up grouping in actix

* tests: fix test_group.py

* cargo fmt

* refactor: extract constants

* remove Hash from ScoredPoint

* `Option<collection_by_name>` -> `collection_by_name`

* fix: handle better cases on `match_on`

* fix: consider that subsequent calls can bring better results

* cargo fmt

* fix clippy warnings

* cargo fmt

* refactor: move `Group` to `types`, localize `hydrate_from`, remove `Deref` impls

* refactor `add_points`

* refactor: turn `GroupKey` into enum

* refactor: make `HashablePoint` inner struct private

* feat: add grpc layer, make new `PointGroup` type to use as output

* fix: update openapi models

* docs: update grpc docs

* fix merge errors

* refactor: add BaseGroupRequest to make code DRYer, improve doc comments

* cargo fmt

* perf: increase precision; choose best groups by score

* misc: add more integration tests, fix review comments

* cargo fmt

* fix: reimplement interface to flatten search and recommend requests, excluding offset

* cargo fmt

* refactor: move `r#do` impl to `GroupRequest`

* fix: update grpc docs

* perf: sort in reverse order

* fix: use fist value of a Value::Array

* fix: validate group_by to not support bracket notation, fix int. tests

* fix: update grpc validation

* tests: update collection_tests

* refactor: move validation to the api layers

* Oops: reupdate tests

* refactor: let the derives derive (thanks @ffuugoo)

* refactor: use a new GroupId on the output

also increases performance by copying less

* remove hashable set, take ordering into an account, fix mutliple groups values support

* fmt

* refactor group_id + rename per_group -> group_size, fix clippy

* remove GroupKey wrapper

* @agourlay review fixes

* refactor: `group_min_scores` and `group_max_scores` ->  `group_best_scores`

* refactor: use set difference on `keys_of_unfilled_best_groups`

* refactor: use set intersection on `len_of_filled_best_groups`

* refactor: turn best_group_keys into iterator

* fix: remove [] syntax limitation

* fix: update openapi.json

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-05-15 23:05:20 +02:00
Jesse
b67c655ddb Add caching of docker layers in CI (#1856)
* Add caching of docker layers in CI

Build required docker images for CI in a workflow step using buildkit's
gha cache type. This will populate the local layer cache from github
actions' cache. Builds in subsequent CI steps will be nearly instant,
because all layers can be reused.

* add minor change to see if build time is any faster

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-05-08 17:02:29 +02:00
Roman Titov
cf04b1a92b Add /cluster/recover API endpoint (#1451)
- Add required internal `raft::raw_node::RawNode::report_snapshot` calls
- Add methods to propagate `raft::raw_node::RawNode::request_snapshot` call to the consensus thread
- Add `/cluster/recover` API endpooint
- Add `test_collection_recovery.py` integration test (disabled on CI; documents current, incorrect behavior)
2023-02-15 04:19:11 +10:00
Ivan Pleshkov
f50f1f4c71 #1119 disable updating feature (#1126)
* disable updating feature

* customize error message

* update namings

* Update src/actix/api/service_api.rs

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

* fix build

* update api

* update api and allow deletion

* update openapi

* replace Bad Request with Forbidden

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2022-10-18 12:58:38 +02:00
Ivan Pleshkov
42e930ab8f Segment telemetry (#814)
* segment telemetry

* anonymize trait

* fix build

* are you happy fmt

* anonimyze implementations

* sliding window avg (#826)

* Actix web telemetry (#828)

* actix web telemetry

* small as move

* use tokio mutex instead of std

* add comments

* are you happy fmt

* use u16 as http status code

* telemetry structs rename

* fix build

* using parking lot mutex

* telemetry web api (#842)

* telemetry web api

* telemetry openapi (#843)

* use async mutex for telemetry collector

* use tokio mutex for telemetry collector

* are you happy fmt
2022-07-22 19:27:07 +04:00
Andrey Vasnetsov
fac87018c4 Snapshoting API (#764)
* wip: rest api for snapshots

* fmt

* fix tests

* fmt

* wip: collection snapshoting and recovery

* fmt

* remote shard snapshots

* remote shard test

* fmt

* extend proxy snapshot test + fix double read lock

* fmt + clippy

* openapi schema

* Update openapi/openapi-snapshots.ytt.yaml

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

* Update openapi/openapi-snapshots.ytt.yaml

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

* Update src/main.rs

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

* Update src/main.rs

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

* reduce writes on snapshots location

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2022-07-01 13:21:57 +02:00
Andrey Vasnetsov
7c254a0de0 preserve fields order in OpenAPI schema (#655) 2022-06-02 19:12:30 +02:00
Andrey Vasnetsov
c286bde562 Cluster api (#631)
* cluster status API

* add cluster api to OpenAPI specification
2022-05-27 14:52:51 +02:00
Andrey Vasnetsov
bdc3194b13 allow to return vectors and payload with recommendation request #353 (#357)
* allow to return vectors and payload with recommendation request #353

* fmt

* unify `with_vector` comment line

* upd openapi
2022-03-02 10:42:58 +01:00
Andrey Vasnetsov
d51a70fa93 add openapi validation during generation #208 (#248)
* add openapi validation during generation #208

* fix: POST -> PUT in point update api implementation and docs #208

* fix: openapi structure exposure

* fix: api usage in stress test
2022-01-24 17:33:57 +01:00
Arnaud Gourlay
97cb5091bc Split Points API #208 (#221)
Split Points API #208
2022-01-24 07:54:47 +01:00
Andrey Vasnetsov
d7148126ce Split collection update API into several endpoints (#126)
* split storage operation structures #32

* cargo fmt #32

* split collection update api into several endpoints #32

* cargo fmt #32

* fix tonic-related code with new structures

* upd alias structures

* use ytt teplate engine for OpenAPI Endpoint schema generation
2021-12-13 09:38:33 +01:00
trean
d30e6fa8ee Implementation of points scroll API #38 (#40)
* WIP: filtered points iterator #38

* add paginated filtered point request function #38

* add scroll api + openapi definitions #38

* fix openapi #38
2021-06-20 15:30:12 +02:00
Andrey Vasnetsov
07f9fa4113 redoc documentation 2020-10-27 13:52:00 +01:00
Andrey Vasnetsov
aa77e69632 OpenAPI definitions generator 2020-10-26 22:49:08 +01:00
Andrey Vasnetsov
c0aac13f3b OpenAPI definitions generator 2020-10-26 22:30:37 +01:00
Andrey Vasnetsov
ee9f3646b6 add API endpoints to OpenAPI doc 2020-10-26 18:08:34 +01:00
Andrey Vasnetsov
3dd550b6b9 OpenAPI 3.0 doc generation 2020-10-26 17:44:31 +01:00