314 Commits

Author SHA1 Message Date
Tim Visée
e11b519b76 Downgrade missing static folder error to warning (#2054)
Refs: https://github.com/qdrant/qdrant/pull/2046#issuecomment-1584445594
2023-06-19 15:20:58 +02:00
Arnaud Gourlay
98831c091e Better error reporting for missing static folder (#2046)
* Better error reporting for missing static folder

* only one error
2023-06-19 15:20:25 +02:00
Andrey Vasnetsov
16ddb98134 Web UI integration (#2009)
* wip: integrate UI web interface

* fmt

* Api key exclusion rule + fixes

* upd welcome url

* rollback api key in config
2023-06-19 15:00:30 +02:00
SunisDown
96678ff28d fix: validate collection name while creating collection (#1990)
* fix: validate collection name while creating collection

* fix: validate collection name for Windows

* Use simpler method for checking if collection name contains illegal char

* Add strict collection name validation to gRPC create collection

* Add strict collection name validation to REST create collection

* Add validation error rendering for does_not_contain

* Remove collection name validation from storage internals

* Add some test cases for stricter collection name validation

* Revert ToC changes

---------

Co-authored-by: timvisee <tim@visee.me>
2023-06-19 14:54:10 +02:00
Tim
a048be2217 Fix warnings pointed out by cargo doc (#1997) 2023-06-19 14:53:44 +02:00
Luis Cossío
da78899bab Lookup: add lookup feature to group_by (#1996)
* feat: add GroupBy builder
- move PointGroup to `collection` crate
- make GroupBy struct to add lookup feature in a builder pattern

* test: add happy GroupBy tests
- restructure grouping tests into own file
- fix GroupId precedence of i64 vs u64

* update openapi schema

* fix rebase

* tests: minor refactor

* refactor: integrate lookup params into GroupRequest
- rename `Lookup` -> `RetrievedLookup`
- rename `LookupRequest` -> `WithLookup`

* fix: rename `lookup` -> `with_lookup` and set options on tests
- use @timvisee 's suggestion on builder.rs

* refactor: remove `RetrievedLookup` enum

* update openapi
2023-06-19 14:53:31 +02:00
Tim Visée
794fa9d724 Log better TLS and REST/gRPC start errors (#2004)
* Add tls directory to .gitignore

* Add error type to certificate helpers

* Log REST and gRPC server errors

* Cleanup

* Rename log_err to log_err_if_any

* Add distinction between no and invalid private key
2023-06-19 14:53:03 +02:00
llogiq
403162125a Migrate from OpenSSL to Rustls (#1865)
* Migrate from OpenSSL to Rustls

* Add TTL based certificate rotation for Rustls in actix

See: <https://github.com/qdrant/qdrant/pull/1865#issuecomment-1539752859>

* Update last update time when certificate is replaced

* Update error message

* Add option to disable certificate TTL, add TTL validation

* Cleanup

* Update comment for service.enable_tls, also enables TLS for gRPC

* Apply suggestions from code review

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

* Move with_buf_read into certificate_helpers, it is used there

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

* Remove level of scoping

* Add TLS enabled/disabled log messages

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2023-06-19 14:45:30 +02:00
Roman Titov
8215410411 Add optional tracing support (#1708)
* Add optional `tracing` support

TODO:
- add documentation

* Add explicit compile-time check for `--cfg tokio_unstable` rust flags...

...if `console-subscriber` feature is enabled

* Add basic documentation

* fixup! Add basic documentation

Add links, reworded few phrases and document `tracing` feature

* fixup! fixup! Add basic documentation

- Fix `tokio-tracing` link

* fixup! Add basic documentation

Too much code-blocks...

* Move tracing setup into a separate function

* fixup! Move tracing setup into a separate function

- move tracing setup to a separate file
- fix error handling

* fixup! Move tracing setup into a separate function

Add missing file 🙈
2023-06-19 14:38:05 +02:00
Tim Visée
df88289f4c Use const fn where possible for serde defaults (#1949) 2023-06-19 14:35:17 +02:00
Russ Cam
a80d4cb371
Fix documentation links (#2000)
* Update documentation links

This commit updates documentation links to point to
the correct locations.

* formatting
2023-05-31 10:02:10 +02:00
Tim Visée
1ad443df4d
Rework settings/configuration loading (#1972)
* Improve and simplify settings loading

* Add config/local to .gitignore

* Add error if specified --config-file could not be loaded

* Give custom config path higher priority than other files

* Improve config file validation at loading, report more descriptive errors

* Tweak tests

* Cleanup config building

* Cleanup config tests
2023-05-25 16:10:31 +02:00
Andrey Vasnetsov
f6a8e4cb89
V1.2.0 (#1950)
* up to v1.2.0 + use only minor version in openapi docs

* fmt
2023-05-23 18:16:59 +02:00
Andrey Vasnetsov
12a2fd9776 Update default vector with proto (#1918)
* allow to use default vector in update api

* fmt
2023-05-17 23:25:21 +02:00
Tim Visée
b340aa14f4 Simplify/flatten point selection in delete vectors REST endpoint (#1898)
* Flatten points selector in delete vectors REST endpoint

This makes the vector deletion API consistent with other endpoints using
the point selector.

* Update tests for flattened delete vectors point selector

* make api consistent with existing ones

* update openapi

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-05-17 11:26:31 +02:00
Luis Cossío
716f84cfcc 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-17 11:25:48 +02:00
Arnaud Gourlay
b7761f7095 Add WAL inspector binary (#1867)
* add wal inspector binary

* print entries count

* add minor doc
2023-05-17 11:25:32 +02:00
Andrey Vasnetsov
45ae3e048b Dynamic mmap vector storage (#1838)
* wip: chunked mmap

* Fix typo

* insert and get methods

* dynamic bitvec

* clippy

* wip: vector storage

* wip: fmt

* wip: mmap chunks

* wip: mmap problems

* Share transmuted mutable reference over mmap

* option to enable appendable mmap vectors

* fmt

* rename storage status file

* update tests

* fix get deleted value range

* add recovery to vector storage tests

* add flush to tests

* fix transmute from immutable to mutable

* make transmuted pointer private

* remove unused unsafe functions

* force WAL flush if wait=true

* move wal flush into updater thread

* remove flush from update api

* Minimize pub visibility for specialized/dangerous functions

* Allocate vector with predefined capacity

* Inline format parameters

* Assert we have multiple chunks while testing, test is useless otherwise

* Remove unnecessary scope

* Remove unnecessary dereference

* Random bool has 0.5 as standard distribution, use iter::repeat_with

* Replace RemovableMmap::new with Default derive

* Rename len to num_flags

* Use Option replace as it is convention alongside take

* Add FileId enum to replace error prone manual ID rotating

* Use debug_assert_eq where applicable

* Refactor drop and set to replace

* Change default chunk size for chunked mmap vectors to 32MB

This change is made as per GitHub review, because allocating a few
storages with 128MB would take a significant amount of time and storage.

See: https://github.com/qdrant/qdrant/pull/1838#discussion_r1187215475

* Replace for-loops with iterators

* Draft: add typed mmap to improve code safety (#1860)

* Add typed mmap

* Replace some crude mmap usages with typed mmap

* Use typed mmap for deleted flags

* Simplify dynamic mmap flags a lot with new typed mmap, remove flags option

* Reformat

* Remove old mmap functions that are now unused

* Reimplement mmap locking for mmap_vectors

* Add MmapBitSlice tests

* Replace MmapChunk with new typed mmap

* Update docs

* Clean-up

* Disable alignment assertions on Windows for now

* Rename mmap lock to mlock to prevent confusion with lockable types

* one more small test

* Some review fixes

* Add aliasing note

* Add basic error handling in typed mmap constructors

* Use typed mmap error handling throughout project

* Move mmap type module to common

* Fix transmute functions being unsound

See https://github.com/qdrant/qdrant/pull/1860#discussion_r1188593854

---------

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

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
2023-05-17 11:24:32 +02:00
Tim Visée
f9b679a66e Add REST interface to update/delete optional named vectors (#1836)
* Add update/delete REST endpoints

* Add update/delete vector REST endpoints to OpenAPI specification

* Fix update vector with no changes not triggering a validation error

* Update OpenAPI specification for updated request type
2023-05-17 11:22:50 +02:00
Tim Visée
5805811ad4 Add gRPC interface to update/delete optional named vectors (#1816)
* Add segment entry function to update named vectors

* Use already available function to update existing vectors

We already had a segment function to update existing named vectors. This
change ensure we use that instead of separating it separately. As a
bonus, this adds support for setting multiple named vectors at once.

* Update set vectors ourselves, don't drop omitted vectors

* Refactor vector updating functions, separate update and replace

* Add basic vector ops, add update/delete functionality to segment updater

* Add internal and public gRPC types and actions for vectors

* Add gRPC API actions

* Reformat

* Add VectorOperations to vector ops, add basic validation

* Validate gRPC vector types

* Validate vector operation structs

* Construct PointIdsList through From trait

* Update gRPC docs

* Use VectorsSelector for vector deletions in gRPC

* Add support for updating multiple points/vectors in update vectors API

* Update gRPC docs

* Fix incorrect gRPC type numbering

* Return point ID error from vector update/delete functions if not found

* Fix disbalanced vectors test
2023-05-17 11:22:45 +02:00
Roman Titov
93d784f269 Improve handling out-of-RAM errors during Qdrant startup (#1777)
* WIP: Start working on out-of-RAM errors handling [skip ci]

* Implement basic handling of out-of-RAM errors during Qdrant startup

* Try to fix CI fail by allowing both V1 and V2 cgroups

* Try to fix CI fail by improving cgroups handling

* Fix cgroups path detection/handling (+ some minor stylistic changes)

* fixup! Fix cgroups path detection/handling (+ some minor stylistic changes)

* Add test

* Enable low RAM test

* fixup! Add test

* free memory checks

* rm unused function

* Oom fallback script (#1809)

* add recover mode in qdrant + script for handelling OOM

* fix clippy

* reformat entrypoint.sh

* fix test

* add logging to test

* fix test

* fix test

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-05-17 11:21:48 +02:00
Yiping Deng
8687d2863e Add support for TLS certificate rotation (#1808)
* Add certificate roatation for actix

* Add config file explaination

* Fix code style

* Drop pub modifier for helper module

* Fix clippy error

* Fixing PR comments

* Remove unused variable and fix clippy

* Transform option building in if-else to then_some

---------

Co-authored-by: timvisee <tim@visee.me>
2023-05-17 11:21:39 +02:00
paulotten
6e6ff8f27b fix: use #[sealed_test] for tests that rely on RUN_MODE environment variable (#1814)
closes #1803
2023-05-17 11:20:30 +02:00
Andrey Perelygin
483e5075fc Collection Cluster API via GRPC (#1774)
* Collection Cluster API via GRPC

* Conversations fix; map_err fix
2023-05-17 11:20:22 +02:00
paulotten
b7d0d67a58 feat: embed default config file at compile time (#1776)
* feat: embed default config file at compile time

* Add `test_no_config_files` and supporting `find_config_files` parameter

* Error if `RUN_MODE` set but can't find config files

* feat: warn if config files not found

* remove find_config_files flag

* Add test to deserialize just the embedded default config

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
Co-authored-by: timvisee <tim@visee.me>
2023-05-17 11:18:42 +02:00
Andrey Vasnetsov
3bf93068df Update cluster_api.rs (#1770) 2023-05-17 11:13:51 +02:00
paulotten
cbde5b5a73 feat: built in api-key auth (#1745)
* feat: built in api-key auth

* doc: Sending an api-key over an unencrypted channel is insecure.

* feat: constant time comparision for api-keys

* use `option_layer`
2023-05-17 11:08:30 +02:00
paulotten
5eb0316389 chore: fix clippy warnings (#1740)
* chore: fix clippy warnings

- Prefer `unwrap_or_else` over `unwrap_or` as the later is always executed.
- Use `clamp`.

* chore: convert `default_quantization_ignore_value` and `default_quantization_rescore_value` to `const fn`

* chore: revert `clamp` change
2023-05-17 11:02:43 +02:00
Arnaud Gourlay
b85777e810 gRPC logging middleware (#1696)
* gRPC logging middleware

* log more information

* filter out cancelation to avoid noise
2023-05-17 11:00:30 +02:00
Tim Visée
9f7c59233f Remove collections_{full,aggregated}_total metric gauges (#1706) 2023-05-17 10:59:32 +02:00
Roman Titov
1437069ede Add message_timeout_ticks parameter to consensus config (#1709)
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-05-17 10:59:16 +02:00
Luis Cossío
ac4302f555 [WIP] Include startup date in telemetry (#1676)
* feat: add boot time to telemetry

* refactor: rename boot -> startup

* review fixes

* update openapi

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-11 14:32:02 +02:00
Tim Visée
868626f409 Add vector specific quantization configuration (#1680)
* Add QuantizationConfigDiff type

* Add quantization config diff to vector parameters

* Prefer vector config over collection config for quantization

* Update OpenAPI specification

* Validate quantization configuration quantile in 0.5-1.0 range

As per https://github.com/qdrant/qdrant/pull/1681

* Add test if check if vector specific quantization config is persisted

* Alias quantization to quantization_config in vector parameters

* Remove quantization config diff, use full vector specific config instead

* Regenerate OpenAPI specification and gRPC docs

* Fix compilation error

* Add error handling to quantization config conversions

* Fix quantization integration test, make HNSW test stricter
2023-04-11 14:31:34 +02:00
Luis Cossío
e1d494d6be Include "last_responded" in telemetry (#1668)
* feat: include "last_queried" in /telemetry

* fix: anonymize responses in the WebApiTelemetry and GrpcTelemetry Anonymize impls

* fix: anonymize the last_queried field

* fix: use YYYY/MM/DD hh:mm:ss format on 'last_queried'

* tests: add and fix telemetry test

* refactor: rename last_queried -> last_responded

* cargo fmt

* update openapi models

* refactor: rename last_request_time -> last_response_date

* tests: update test

* review changes

* add chrono to schemars

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-11 14:31:28 +02:00
Tim Visée
66ba8f17af Add vector specific HNSW configuration (#1675)
* Validate VectorConfig/VectorParams, remove obsolete validation

* Add HNSW config diff to vector parameters

* Validate params in collection config

* Add HNSW config to segment vector data config

* Add VectorsConfig params iterator for more elegant conversions

* Prefer vector HNSW config over collection config for building HNSW index

* Base segment vector param HNSW config on collection config

* General improvements

* Rewrite HNSW ef_construct extract function to also consider vector configs

* Update OpenAPI specification

* Add test to check if vector specific HNSW config is persisted

* review changes

* review changes

* Regenerate gRPC docs

* Fix test on Windows

* Regenerate OpenAPI specification

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-11 14:31:18 +02:00
Tim Visée
c4c78e2b2d Add validation to gRPC (#1634)
* Implement validation on generated gRPC point types

* Validate gRPC point API requests

* Nicely describe validation errors

* Add validation extensions for special types used in gRPC

* Validate gRPC collection API requests

* Validate gRPC Raft and snapshot API requests

* Simplify validation builder, guess derives from fields, fix two fields

* Remove point recommending limit constraint to fix gRPC tests

* Clean up validation logic for gRPC in build.rs

* Validate internal gRPC requests, don't error but show warnings in log

* Optimize gRPC validation extensions, remove unused bits

* Validate gRPC collection creation configuration

* Add custom validators for special gRPC types

* Value is automatically attached to validation error

* Cleanup

* Remove obsolete tests

* Add basic gRPC validation test

* Add some gRPC request payload validation tests

* Set max collection name length to 255 in validation to match Actix
2023-04-11 14:31:12 +02:00
Yiping Deng
673a30fc55 Add user client certificate validation capabiltiy (#1663)
* Add user client certificate validation capabiltiy

* Add integration test for client side certificate validation

* Add server side ca certificate to verify

* Use store builder for client side certificate

* Use a trust store

* Fix config for TLS test

* Fix test, remove mTLS for external grpc endpoint

* Fix config comment

* Remove useless commit

* Fix style

* Fix internodal TLS test

* Simplify setting SSL verify mode

---------

Co-authored-by: timvisee <tim@visee.me>
2023-04-11 14:30:59 +02:00
Andrey Vasnetsov
623f3bffe1 Try to fix dying shards (#1682)
* use common channel pool for healthcheck requests

* add dynamic channel pool

* fmt

* lower parallel connections num

* fmt

* fix clippy

* fix clippy

* better status error message

* smarter channel dropping conditions

* per-channel stats

* refactor pool

* rollback dockerfile

* health-check timeout

* prevent reporting last active peer as dead

* introduce update rate limit

* only rate-limit client requests

* ability to save snapshot without locking wal (#1685)

* ability to save snapshot without locking wal

* fix empty wal saving

* skip waiting on local shard in listener mode even if it is a direct request to listener shard

* snapshot recovery test + better handling of segment versions

* use latest wal

* review changes
2023-04-11 14:30:50 +02:00
Arnaud Gourlay
7657d79f0d cleanup and document openapi issue (#1665) 2023-04-11 14:29:55 +02:00
Arnaud Gourlay
64ff64fdde Remove decoding limit for external gRPC endpoints (#1659) 2023-04-11 14:25:27 +02:00
Arnaud Gourlay
54ecc5d7b7 Set max_decoding_message_size to larger value following tonic 0.9.0 (#1658) 2023-04-11 13:46:35 +02:00
Alex Huang
de93c75bf3 feat: add wait param for all snapshot API (#1571)
* feat: add wait parm for all snapshot API

* update openAPI

* avoid unwrap

* remove all unwarp

* return HTTP 202 when no waiting on snapshot creation

* return 202 when non wait

* update open API

* update param on python test

* update and test api

* optimize the test

* return 202 when non-wait delete

* recover fixes

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-11 13:42:11 +02:00
Yiping Deng
89905a6b3f Use mutual TLS for peer-to-peer connection (#1642)
* Use mutual TLS for peer-to-peer connection

* Exclude external client facing gRPC service from client CA check
2023-04-11 13:41:15 +02:00
Ivan Pleshkov
f0f92292e0 Add Actix and config validation (#1463)
* actix validation

* add check for memmap/indexing_threshold

* fix actix json settings

* Validate settings configuration on start, print pretty warnings on fail

* Add more validation rules for settings and nested types

* Move shared validation logic into collection/operations

* Show validation warning in log when loading some internal configs

* Show prettier actix JSON validation errors

* Stubs for pretty handling of query errors, reformat validation errors

* Use crate flatten function, the hard work was already done for us

We don't have to flatten validation errors into their qualified field
names ourselves because there is a utility function for this.

* Configure actix path validator

* Actix endpoints don't require public

* Extend validation to more actix types

* Validate all remaining actix path and query properties

* Rephrase range validation messages to clearly describe they're inclusive

* Validate all query params to respond with pretty deserialize errors

* Nicely format JSON payload deserialize error responses

* Improve error reporting for upsert point batches

* Add basic validation test that checks a path, query and payload value

* Add some validation constraints

* Add simple validation error render test

* Update Cargo.lock

---------

Co-authored-by: timvisee <tim+github@visee.me>
2023-04-11 13:41:06 +02:00
Tim Visée
e2de25dc4c General improvements (#1628)
* `enable_time` is obsolete with `enable_all`

* More elegantly build CPU feature list, remove final comma
2023-04-11 13:40:25 +02:00
Tim Visée
f34095785c Fix metrics vector count (#1627)
* Fix total vector count in metrics

* Resolve TODO
2023-04-11 13:40:07 +02:00
Timon Vonk
9e281bfa80 Add aggregated vector count to prometheus /metrics endpoint (#1598)
* Add aggregated vector count to prometheus /metrics endpoint

* Remove println!

* Move aggregated_vector_count outside of option ref loop
2023-04-11 13:40:02 +02:00
Tim Visée
13c9a679b2 Improve metrics building performance, limit endpoints to whitelist (#1616)
* Fix incorrect metrics value for cluster commit

* Rewrite metrics logic, don't use registry, write values directly

* Only report REST timings for requests having HTTP 200 response

* Limit metrics reporting of endpoints to whitelist

The whitelist contains a selection of search, recommend and upsert endpoints.

* Add MetricsParam, remove detail level, keep anonymize

* Request metrics in basic API test

* Specify content type for metrics endpoint

* Add OpenAPI test for metrics endpoint, remove from basic API test

This test probes for some strings that must exist in the output

* Add note that metrics endpoint whitelist must be sorted
2023-04-11 13:39:41 +02:00
Ibrahim M. Akrab
21641346aa add upload snapshot functionality using multipart request (#1578)
* add upload snapshot functionality using multipart request

* remove unnecessary printing

* Add proper error handling

* add snapshot upload integration tests

* Fix maximum uploaded snapshot size limit

* review changes

* update OpenAPI with upload endpoint

* add missed query param in openapi

* remove unused function

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-11 13:37:39 +02:00
Arnaud Gourlay
b43dd6876b Update to Raft-rs 0.7.0 (#1568)
* Raft-rs 0.7.0

* Remove `request_index` field from `ConsensusOperations::RequestSnapshot` message

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2023-04-11 13:35:43 +02:00