115 Commits

Author SHA1 Message Date
Andrey Vasnetsov
0a16a62f99 feat: io_uring setting to control which components use the io_uring backend (#10008)
* feat: `io_uring` setting to control which components use the io_uring backend

A few components have both an mmap and an io_uring variant reading the very
same files: the immutable dense vector storages, the single-file TurboQuant
storage, and the mmap payload storage. Until now the choice was a side effect
of `async_scorer` — a vector-search knob — plus, for the payload storage, a
feature flag that was parked off because io_uring is ~2x slower than mmap when
the data fits the page cache (#9310, #9409).

Add `storage.performance.io_uring`, optional, with two modes:

- unset (default): unchanged behaviour. The vector storages keep following
  `async_scorer`; the payload storage stays on mmap.
- `disabled`: no component uses io_uring.
- `auto`: a component uses io_uring when its memory placement is `cold` (data
  is left on disk, so reads hit the disk and there is something to gain), its
  feature flag allows it, and the kernel supports io_uring. Components meant to
  sit in RAM keep using mmap.

The decision lives in one place, `segment::common::io_uring::use_io_uring`, so
the openers no longer each reach for the async-scorer global. Kernel support is
now probed up front through `is_io_uring_supported()` instead of opening a file
and falling back on error.

`async_payload_storage` now defaults to on: it no longer decides anything by
itself, it only lifts the ban, and the payload storage no longer follows
`async_scorer` at all — so turning it on cannot silently move an existing
`async_scorer: true` deployment onto the slower path.

Which backend a component ended up on depends on the config, the placement and
the kernel at once, so report it in `SegmentInfo`: `vector_data[name].io_backend`
and `payload_storage_io_backend`, both `"mmap" | "io_uring"`, absent for
components that have no such choice.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Trim comments, drop trivial tests

Two tests were only restating their own implementation: `test_mode_round_trip`
round-tripped the encode/decode pair next to it, and `test_io_uring_config`
checked that serde deserializes a two-variant enum. The mode matrix test stays,
it is the one that pins the semantics.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Flatten `IoBackend` in OpenAPI, derive `JsonSchema` for `IoUringMode`

Per-variant doc comments on a plain string enum make schemars emit a `oneOf`
of anonymous single-value objects instead of a flat `enum`. Move the variant
descriptions into the enum doc, as `Memory` and friends already do.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Update lib/segment/src/vector_storage/turbo/turbo_vector_storage.rs

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

* Update lib/segment/src/types.rs

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

* Update lib/segment/src/types.rs

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

* Update lib/segment/src/types.rs

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

* Update lib/segment/src/types.rs

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

* upd openapi schema

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

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

* Require kernel io_uring support in the async-scorer fallback

`use_io_uring` returned `get_async_scorer()` verbatim when the `io_uring`
setting is unset, so an enabled async scorer on a kernel without io_uring
opened the io_uring storage, failed, and fell back to mmap with an error
log per segment. Gate that branch on `is_io_uring_supported()` too, like
`Auto` already is, so the component just stays on mmap.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* upd openapi schema

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2026-07-28 21:17:36 +02:00
Andrey Vasnetsov
94fdd0e746 Support memory placement in service-level storage config defaults (#9950)
* Support memory placement in service-level storage config defaults

Follow-up to #9684: `storage.payload.memory` and
`storage.collection.vectors.memory` set service-wide placement defaults
for newly created collections, deprecating `storage.on_disk_payload` and
`storage.collection.vectors.on_disk`.

Defaults resolve as: request `memory` > request legacy flag > service
`memory` > service legacy flag; exactly one level is filled to avoid
spurious memory-vs-legacy mismatch warnings.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Mark hnsw_index.on_disk deprecated in config.yaml, document memory option

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 10:35:52 +02:00
Tim Visée
4507a118a2 Add config option to disable snapshot restore from URL (#8628)
* [ai] Add config boolean to disable URL based snapshot restore

* Merge if-statement

* Comment-out config option by default

* [ai] Also block partial snapshots from remote URLs

* [ai] Only run clock consistency test when staging feature is present

* [ai] Add integration test
2026-04-24 16:53:57 +02:00
Daniel Boros
bf13d43816 feat/internal-grpc-auth (#8676) 2026-04-21 14:21:28 +02:00
Andrey Vasnetsov
f321c9fe37 Low Memory mode (#8714)
* [AI] implement parameter + cover populate + cover quantized vectors

* telemetry OpenAPI schema

* [AI] hook immutable payload indexes

* fmt

* do not populate payload index if we fallback to mmap

* Reformat

* Also suppress universal IO disk cache population

---------

Co-authored-by: timvisee <tim@visee.me>
2026-04-20 11:33:35 +02:00
Andrey Vasnetsov
b9cc0778f5 add tracing ID into audit logging (#8402)
* add tracing ID into audit logging

* format and refactor

* clippy

* review fixes

* fmt
2026-03-17 00:00:06 +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
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
Daniel Boros
6d01e88d74 feat: add x-forwarded support (#8028)
* feat: add x-forwarded support

* fix: port parsing & add tests

* fix: case-insensitive mode
2026-02-03 10:47:07 +01:00
Jojii
5c0863ae8e Add global metrics prefix (#7438)
* Qdrant prefix for metrics

* Update metrics tests

* Update openapi docs

* Make prefix configurable

* don't enable metrics prefix by default

* Adjust tests and openapi specs

* Custom validation for metrics_prefix setting
2025-10-30 11:37:20 +01:00
Andrey Vasnetsov
34596530d1 remove default explicit config for strict mode (#7369)
* remove default explicit config for strict mode

* Don't prefix commented out properties with space to remain consistent

* Don't crash test if strict mode config is not set at all

---------

Co-authored-by: timvisee <tim@visee.me>
2025-10-09 12:00:01 +02:00
Jojii
290f9e2675 Always load InferenceService (#7050)
* Always load InferenceService

* Add BM25 openapi test

* Add warning to development.yaml config (#7051)
2025-08-13 16:59:42 +02:00
Kacper Łukawski
c5452933a2 Improve description of full_scan_threshold (#7033)
* Improve description of full_scan_threshold in configuration

* Update OpenAPI spec

* edit in grpc

* coderabbit nit

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-08-13 12:02:40 +02:00
Kyamran
2cd230dda5 Add buffer_size_b to on_disk (#6993)
* Add buffer_size_b to on_disk

* Rename buffer_size_b to buffer_size_bytes
2025-08-07 13:42:59 +02:00
Jojii
4b6806bdc6 Fix config path & Webui Assets in Debian package (#6958)
* Fix debian config location & WebUI assets

* remove config overwrite env variable again
2025-07-31 10:02:17 +02:00
Tim Visée
a5869beb99 Deprecations for Qdrant 1.15.0 (#6892)
* Deprecate init_from

* Mark memmap_threshold as deprecated

* Mark locks API as deprecated

* Mark RBAC collection access payload filter as deprecated

* Allow deprecations in tests and benchmarks
2025-07-17 16:10:45 +02:00
Andrey Vasnetsov
ee9b88c876 Adjust default values for better performance (#6844)
* adjsut default values for better performance

* upd openapi
2025-07-10 16:50:36 +02:00
Andrey Vasnetsov
c11b96301b remove max indexing threads from config (#6760)
* remove max_optimization_threads from config.yaml

* fmt
2025-06-26 10:26:09 +02:00
Andrey Vasnetsov
dc203e11b0 Add setting to limit max number of collections (#6548)
* add setting to limit max number of colelctions

* upd openapi

* Add max_collections to config

---------

Co-authored-by: timvisee <tim@visee.me>
2025-05-20 13:40:56 +02:00
Tim Visée
7f1ac225e9 Mark hardware reporting feature as experimental in the configuration (#6258) 2025-03-26 11:28:41 +01:00
Tim Visée
9a445a71fe Add all feature flag, report enabled flags on start (#6228)
* Add magic all flag, if set all features will be enabled

* Report enabled feature flags on start, if any is enabled

* Remove pub visibility from all, add comment it's only applied on init

* Don't check all flag in is_empty
2025-03-24 14:11:28 +01:00
Tim Visée
4f8735462d Add feature flag to skip RocksDB in immutable payload indices (#6226) 2025-03-22 11:01:24 +01:00
Tim Visée
6aa24ee51e Fix snapshot restore with new shard key format (#6202)
* Use new shard key storage wrapper type when recovering snapshot

* Fix compiler warning
2025-03-19 17:57:53 +01:00
Tim Visée
45d2fd9cf7 Mutable ID tracker integration (#6174)
* Rename mutable ID tracker mappings file

* Make new ID tracker the default, add new variant for RocksDB tracker

* In mutable ID tracker, only list files if they exist on disk

* Don't use the new mutable ID tracker yet

* Feature flag usage of new mutable ID tracker

* Simplify RocksDB check a bit

* Rename both the mutable ID tracker files
2025-03-19 13:37:54 +01:00
Tim Visée
75eb0b38af Add global feature flags (#6194)
* Add global feature flags structure, load on start

* Feature flag use of new shard key format

* Enable feature flag for new shard key format by default in dev builds

* Prevent unwrapping everywhere; Single place for initialization (#6198)

* Disable shard key feature flag by default for now, it causes problems

---------

Co-authored-by: Jojii <15957865+JojiiOfficial@users.noreply.github.com>
2025-03-19 11:15:40 +01:00
Tim Visée
cc1c8245c2 Enable consensus compaction by default (#5903)
* Enable consensus compaction by default

* Also set new compaction default in code
2025-02-04 15:05:23 +01:00
Tim Visée
797346b051 Add default log format properties to configuration file (#5942) 2025-02-04 15:01:59 +01:00
Roman Titov
189fb810e7 Add resharding_enabled option to ClusterConfig (#5770)
* Add `resharding_enabled` option to `ClusterConfig`

If `resharding_enabled` is *not* set, `StartResharding` API returns an error

* Enable `resharding_enabled` option in development config

* fixup! Add `resharding_enabled` option to `ClusterConfig`

Fix tests

* fixup! Enable `resharding_enabled` option in development config

😅

* fixup! Enable `resharding_enabled` option in development config

🙄🙄🙄
2025-01-15 16:07:06 +01:00
Tim Visée
db20cc6660 Update config descriptions (#5684) 2024-12-20 18:21:12 +01:00
Andrey Vasnetsov
5cba8ace43 Explict configuration for deb package build (#5630)
* explicit configuration of deb package

* use special build feature

* Review suggestions

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2024-12-10 11:04:41 +01:00
Luis Cossío
b895bcd872 Transfer blob_store into this repo (#5436)
* copy-paste blob_storage

* get rid of copied utils

* fix clippy

* fmt

* audit blob_store manifest

* move `Payload` into `fixtures.rs`

* fix clippy

* put csv in google storage

* ignore hm test

* fix codespell

* improve files test

* test different block sizes

* remove unused deps

* replace StdRng with SmallRng for faster tests
2024-11-18 12:43:52 -06:00
Luis Cossío
5d3379ae01 Make default_on_disk_payload consistent with config file (#5396)
* make the default `on_disk_payload` match the default config value

* remove duplicate impl, update docstrings

* change default `PayloadStorageType` too

* gen openapi
2024-11-11 10:38:43 -06:00
Jojii
70646af7a8 Add hardware measurements in API (#5306)
* add HwMeasurementAcc and API helpers+types

* add config to API to toggle hardware reporting in API responses

* add Default impl for HwMeasurementAcc

* comments

* review remarks

* include usage into API schema

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-10-29 09:53:22 +01:00
n0x29a
ca6e0f351b Inference Service, billing-id (#5287)
* Inference Service, token

---------

Co-authored-by: n0x29a <n0x29a@example.com>
2024-10-22 12:49:00 +02:00
n0x29a
548d33f8fb Inference Service Integration (#5240)
* Inference Service Integration

* Update src/common/inference/service.rs

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

* Inference Service Integration

* review fixes

---------

Co-authored-by: n0x29a <n0x29a@example.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2024-10-16 19:37:38 +02:00
Jojii
791d064bde [Strict mode] default config (#5037)
* add default config for strict mode

* add default values as example to config/config.yaml

* improve implementation

* update grpc docs
2024-09-25 14:22:36 +02:00
Justin Miller
43ab766e32 Adding logging to disk note to config.yaml. (#5041)
* Adding logging to disk note to config.yaml.

* Update config/config.yaml

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

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2024-09-11 09:33:38 +02:00
David Myriel
64c17ff13d update config.yaml (#4710)
* update config.yaml

* Update config/config.yaml

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

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2024-07-22 20:33:57 +02:00
Jojii
3005de2a01 Add optimizer_overwrite config option (#4317)
* add config option

* add optimizers_config to optimizer calls

* also add for tests

* add to build_optimizers

* rename function parameter
2024-05-31 09:02:44 +02:00
Jojii
f6fa1216c5 Add config option shard_nr_per_node (#4309) 2024-05-30 14:43:01 +02:00
Jojii
6249623f35 Add vectors and quantization options and defaults (#4299)
* add vectors and quantization options and defaults

* remove default quantization settings and add config options for consensus

* change config structure

* change parameter hierarchy

* apply new config values

* review changes

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-05-23 14:16:00 +02:00
Kenshin Tanaka
0d46aeb460 Implement S3 snapshot manager (#4150)
* Add SnapshotsStorageConfig enum(Local or S3) and deserialize implementation

* [refactor]  use snapshots_config instead of s3_config

* update config

* add AWS official`aws-sdk-s3`

* implement store_file() WITHOUT error handling

* implement list_snapshots

* implement delete_snapshot

* run `cargo +nightly fmt`

* delete println

* implement get_stored_file

* Add error handlings

* Refactor AWS S3 configuration and error handling

* fix bugs

* create an empty test file

* fix `alias_test.rs` for StorageConfig type

* tempolary delete some test and try s3 test

* Update integration-tests.yml to use snap instead of apt-get for installing yq

* Update integration-tests.yml to use sudo when installing yq

* add sudo

* make (full/non-full) snapshots downloadable

* debug

* small fix

* Add S3 endpoint URL configuration option

* fix

* fix

* debug

* fix endpoint

* update to http://127.0.0.1:9000/

* update

* fix

* fix `#[get("/collections/{collection}/shards/{shard}/snapshots/{snapshot}")]` for s3

* put original tests back

* refactor

* small fix (delete println & echo)

* use object_store and refactor

* create snapshot_storage_ops and implement

* Refactor get_appropriate_chunk_size function to adjust chunk size based on service limits and file size

* cargo +nightly fmt --all

* make it more abstract

* Refactor SnapshotsStorageConfig deserialization in SnapShotsConfig

* small update

* small fix

* Update dependencies in Cargo.lock

* Update minio image to satantime/minio-server

* Refactor snapshot storage paths in snapshots_manager.rs and snapshot_storage_ops.rs

* Fix issue with downloaded file size not matching expected size in download_snapshot function

* add flush

* Use Streaming instead of donloading once

* apply `cargo +nightly fmt --all`

* Fix issue with opening file in SnapshotStream::LocalFS variant

* Fix error handling in SnapshotStream::LocalFS variant

* Add integration test for Shard Snapshot API with S3 storage (#7)
2024-05-10 16:54:23 +02:00
Tim Visée
8723b7e93e Add API key field to snapshot restore, fix snapshot recovery with API key (#4155)
* Add API key to HTTP client

* Add API key field to snapshot recovery requests

* Add API key to channel service

* Provide API key when doing snapshot transfer

* Configure API key header name constant in a central place

* Reformat

* Update OpenAPI spec

* Remove suffixed spaces from configuration file

* Allow to specify HTTP headers in some consensus test utility functions

* Add snapshot transfer test with configured API key

* Use random API key in test

* Fix compilation errors and clippy warnings
2024-05-02 17:10:34 +02:00
Andrey Vasnetsov
97241d04e7 add config property to disable jwt by default (#3923) 2024-03-27 14:05:01 +01:00
Tim Visée
230f307b27 Use WAL delta transfer by default for shard recovery for 1.9 (#3800)
* Move peer metadata type around

* Expose peer metadata in channel service

* Use WAL delta transfer by default for recovery, if all nodes are 1.8+

* Add check for missing metadata, assume versionless if we have less

* Use user configured shard transfer method, fall back to WAL delta/stream

* Minor improvements

* Update variable name
2024-03-19 17:08:49 +01:00
Tim Visée
56171c6087 Dynamic CPU saturation integration (#3115)
* Integrate dynamic CPU saturation with public API changes

This reverts commit 08930fefa9.

* Call num_cpus only once
2024-02-05 14:08:02 +01:00
Tim Visée
0301e39943 Dynamic CPU saturation internals (#3364)
* Move CPU count function to common, fix wrong CPU count in visited list

* Change default number of rayon threads to 8

* Use CPU budget and CPU permits for optimizer tasks to limit utilization

* Respect configured thread limits, use new sane defaults in config

* Fix spelling issues

* Fix test compilation error

* Improve breaking if there is no CPU budget

* Block optimizations until CPU budget, fix potentially getting stuck

Our optimization worker now blocks until CPU budget is available to
perform the task.

Fix potential issue where optimization worker could get stuck. This
would happen if no optimization task is started because there's no
available CPU budget. This ensures the worker is woken up again to
retry.

* Utilize n-1 CPUs with optimization tasks

* Better handle situations where CPU budget is drained

* Dynamically scale rayon CPU count based on CPU size

* Fix incorrect default for max_indexing_threads conversion

* Respect max_indexing_threads for collection

* Make max_indexing_threads optional, use none to set no limit

* Update property documentation and comments

* Property max_optimization_threads is per shard, not per collection

* If we reached shard optimization limit, skip further checks

* Add remaining TODOs

* Fix spelling mistake

* Align gRPC comment blocks

* Fix compilation errors since last rebase

* Make tests aware of CPU budget

* Use new CPU budget calculation function everywhere

* Make CPU budget configurable in settings, move static budget to common

* Do not use static CPU budget, instance it and pass it through

* Update CPU budget description

* Move heuristic into defaults

* Fix spelling issues

* Move cpu_budget property to a better place

* Move some things around

* Minor review improvements

* Use range match statement for CPU count heuristics

* Systems with 1 or 2 CPUs do not keep cores unallocated by default

* Fix compilation errors since last rebase

* Update lib/segment/src/types.rs

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>

* Update lib/storage/src/content_manager/toc/transfer.rs

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>

* Rename cpu_budget to optimizer_cpu_budget

* Update OpenAPI specification

* Require at least half of the desired CPUs for optimizers

This prevents running optimizations with just one CPU, which could be
very slow.

* Don't use wildcard in CPU heuristic match statements

* Rename cpu_budget setting to optimizer_cpu_budget

* Update CPU budget comments

* Spell acquire correctly

* Change if-else into match

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>

* Rename max_rayon_threads to num_rayon_threads, add explanation

* Explain limit in update handler

* Remove numbers for automatic selection of indexing threads

* Inline max_workers variable

* Remove CPU budget from ShardTransferConsensus trait, it is in collection

* small allow(dead_code) => cfg(test)

* Remove now obsolete lazy_static

* Fix incorrect CPU calculation in CPU saturation test

* Make waiting for CPU budget async, don't block current thread

* Prevent deadlock on optimizer signal channel

Do not block the optimization worker task anymore to wait for CPU budget
to be available. That prevents our optimizer signal channel from being
drained, blocking incoming updates because the cannot send another
optimizer signal. Now, prevent blocking this task all together and
retrigger the optimizers separately when CPU budget is available again.

* Fix incorrect CPU calculation in optimization cancel test

* Rename CPU budget wait function to notify

* Detach API changes from CPU saturation internals

This allows us to merge into a patch version of Qdrant. We can
reintroduce the API changes in the upcoming minor release to make all of
it fully functional.

---------

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2024-01-31 11:56:34 +01:00
Tim Visée
d04c552619 Limit automatic shard transfers (stateless) (#3458)
* Do not select ourselves when finding auto shard transfer source

* Limit automatic shard transfers with basic transfer count check

* Extract shard recovery transfer request logic to separate function

* Add global shard transfer tracker structure to allow rate limiting

* Count and limit incoming and outgoing shard transfers separately

* Make automatic shard transfer limit configurable

* Move shard transfer tracker from global to collection level

* Comment out new config parameters

* Fix incorrect comment

* Fix missing space in log message

* Fix negated condition

* Remove logic for requesting shard transfer on replica state change

* Check shard transfer limits in consensus sync, use consensus state

Instead of bothering with tracking proposed shard transfers, this now
purely relies on state that is already in consensus. Each time we sync
consensus, we request the maximum number of shard transfers up to the
limit at that time.

* Remove now obsolete shard transfer tracker

* Revert now obsolete changes

* Improve transfer IO counting comment, revert now obsolete code

* Fix typos

* Fix flipped variables, don't take self reference on Copyable type

* Update lib/collection/src/collection/shard_transfer.rs

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

* Handle incoming/outgoing transfer counts separately, don't tuple it

* Improve loop for counting incoming/outgoing transfers

* Remove unused test function

* Add consensus tests for automatic shard transfer limits

* Apply suggestions from code review

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

* Remove debug lines from new test

* Reorder last test a bit to resolve flakyness

* We can have one more transfer for recovery on the other alive node

* Attempt to reduce test flakyness, more points and more frequent polling

* Update config/config.yaml

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>

* Explicitly note default shard transfer limit in configuration

* Use default for shard transfer IO everywhere

* Rename transfer limit check function to be more explicit

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
2024-01-26 16:09:43 +01:00
Tim Visée
c8b0b0a484 Add config property to set default shard transfer method (#3255)
* Add config option to set default automatic shard transfer method

* Also use configured shard transfer method if user doesn't specify

This is not for automatic shard transfers, but when a user initiates a
transfer manually.

* Improve comment for shard transfer method configuration

* Fix test compilation
2023-12-21 20:22:04 +00:00
Wesley
8b806f90de Read-Only API keys (#2979)
* Read-only API keys

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>

Correct placement of OpenAPI security

Place regex dep with actix/tonic

* Read-only API keys

* Replace with pytests

* API Key tests run on the same job

* Drop allow dead-code

* Rename setting key

* Containerized tests

* No special config files

* DRY

* refactor: re-use can_write method

* refactor: replace static by constants

* refactor: get PID from `$!`

* refactor: use explicit brackets on boolean condition

* style: fix identation

* small fixes + account for new APIs

* specify security in openapi

* small fix + chmod for .sh testfile

* add best-efford check for api consistency

---------

Co-authored-by: Amr Hassan <amr.hassan@gmail.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2023-11-23 21:58:35 +01:00