Commit Graph

304 Commits

Author SHA1 Message Date
Gabriel
3392407f6a API for checking collection exists (#3472)
* saving progress

* tests assertions are working

* fixed lint

* fixed typo, existance -> existence

* added timing on grpc

* added timing on grpc

* fixed double time
2024-03-05 16:55:27 +01:00
Andrey Vasnetsov
e59280f1bb Revert "fix: Include git commit id while building docker image if possible" (#3468) 2024-03-05 16:52:57 +01:00
Kumar Shivendu
de5d120197 fix: Include git commit id while building docker image if possible (#3419)
* feat: Print commit id in dev container build workflow

* fix: Keep .git while building Qdrant binary in docker

* fix: Remove redundant printing of git commit id

* fix: Copy only git files first

* fix: Docker build should have commit id if present

* refactor: Use fewer lines of code
2024-03-05 16:52:51 +01:00
xzfc
a11c6f6a5b add optional checksum to snapshot recovery request (#3381)
* add optional checksum to snapshot recovery request

* Update openapi yaml files

* Add pytests for snapshots restoration
2024-03-05 16:52:38 +01:00
dependabot[bot]
966111222c Bump uuid from 1.6.1 to 1.7.0 (#3441)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.6.1...1.7.0)

---
updated-dependencies:
- dependency-name: uuid
  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>
2024-03-05 16:51:59 +01:00
Arnaud Gourlay
b26b87c8d5 Remove unused dependencies (#3435) 2024-03-05 16:49:09 +01:00
Tim Visée
3281be7402 Rename IntegerParams to IntegerIndexParams to be consistent with text (#3385) 2024-03-05 16:47:18 +01:00
Tim Visée
820ade7494 Parameterize integer index, allow lookup or range exclusively (#3380)
* Merge serde attributes

* Remove obsolete conversion

* Add integer type with parameters

* Make integer lookup and range parameters non-optional

* Add parameterized integer index types test

Co-authored-by: Di Zhao <diz@twitter.com>

* Cleanup

---------

Co-authored-by: Di Zhao <diz@twitter.com>
2024-03-05 16:47:07 +01:00
kwkr
4296226555 Add checksum to SnapshotDescription (#2840)
* add checksum to SnapshotDescription

* implement storing snapshot checksums in a file

* Don't serialize checksum if it's None for backwards compatibility

* Remove hex dependency, use Rust std formatter for this

* Do not error if we cannot remove checksum file for snapshot

Some snapshots may not have a corresponding checksum file. Maybe it was
created in an older Qdrant version that didn't have support for this, or
a user hasn't provided any.

* Add debug message when hashing snapshot, can be expensive on large files

* Inline debug messages

* Add checksum to shard snapshots

* If creating snapshot fails, delete snapshot target and checksum file

* Use Rust idiomatic ok() and improve debug messages

* Use correct snapshot checksum paths, clean up after shard snapshot

* Use better path type in get_checksum_path

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2024-03-05 16:46:31 +01:00
Kumar Shivendu
0fe19cfb60 feat: Expose git commit id in the health check endpoint (#3346)
* feat: Expose git commit id in the health check endpoint

* fix: CI errors

* test: Add test for health check api

* feat: Add / endpoint to openapi schema

* Make git commit hash optional

* ci: Enable debugging setup-protoc action

* Install later protobuf compiler through GitHub Action

* Disable debug mode for setup-protoc job

* refactor: Use commit instead of commit_id

* fix: Use commit instead of commit_id gRPC docs

* test: Update ping API test

* refactor: Rename ping api to root api

---------

Co-authored-by: timvisee <tim@visee.me>
2024-03-05 16:46:04 +01:00
dependabot[bot]
b7a3ae933a Bump tokio from 1.35.0 to 1.35.1 (#3285)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.35.0 to 1.35.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.35.0...tokio-1.35.1)

---
updated-dependencies:
- dependency-name: tokio
  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>
2024-03-05 16:43:43 +01:00
dependabot[bot]
11ebb5d8a7 Bump mio from 0.8.9 to 0.8.11 (#3771)
* Bump mio from 0.8.9 to 0.8.11

Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.9 to 0.8.11.
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/mio/compare/v0.8.9...v0.8.11)

---
updated-dependencies:
- dependency-name: mio
  dependency-type: indirect
...

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

* Resolve clippy warnings

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: timvisee <tim@visee.me>
2024-03-05 10:38:41 +01:00
Tim Visée
7aa164bd2d Bump version to 1.7.4 (#3478) 2024-01-29 16:33:27 +01:00
Andrey Vasnetsov
c6a351c82d bump version 1.7.3 (#3256) 2023-12-19 20:19:33 +00:00
Ivan Pleshkov
bd6bd55033 Rename VectorType to DenseVector (#3192)
* rename vectortype to densevector

* rename enums

* are you happy fmt

* openapi

* revert type renamings
2023-12-19 19:26:50 +00:00
dependabot[bot]
a061da1738 Bump tokio from 1.34.0 to 1.35.0 (#3206)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.34.0 to 1.35.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.34.0...tokio-1.35.0)

---
updated-dependencies:
- dependency-name: tokio
  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>
2023-12-19 19:26:43 +00:00
Tim Visée
5848d0cbe6 Bump version to 1.7.2 (#3218) 2023-12-12 19:01:26 +01:00
Tim Visée
97b2483660 Bump version to v1.7.1 (#3197) 2023-12-11 21:34:42 +01:00
Andrey Vasnetsov
dbab7f8c1c bump version 1.7.0 (#3175) 2023-12-08 01:46:36 +01:00
Tim Visée
83c0606be9 Make point, vector and indexed vector counts optional in collection info (#2785)
* Make point, indexed point and vector counts optional in collection info

* Update OpenAPI specification and gRPC docs

* Use functional entry API

* Mark point/vector count fields as deprecated

* Use internal collection info structure to remove internal optionals

* Don't deprecate, but mark point counts as approximate
2023-12-06 17:21:55 +01:00
Roman Titov
cb46a73609 Extend /readyz with shards readiness check (#3053, #3084)
Co-authored-by: generall <andrey@vasnetsov.com>
Co-authored-by: timvisee <tim@visee.me>
2023-12-06 17:20:29 +01:00
dependabot[bot]
358a5e4594 Bump uuid from 1.5.0 to 1.6.1 (#3151)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.5.0 to 1.6.1.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.5.0...1.6.1)

---
updated-dependencies:
- dependency-name: uuid
  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>
2023-12-06 17:20:13 +01:00
Arnaud Gourlay
0935ab5751 Fix naming gRPC shard snapshot service (#3135) 2023-12-06 17:19:01 +01:00
Kaan C. Fidan
8f19257f70 Manhattan distance (#3079)
* implemented Manhattan distance

* updated quantization dependency

* fixed negative distances and doc consistency

* fixed neon implementation

* updated quantization dependency

* updated quantization dependency

* removed redundant copy operation

* updated quantization dependency

* Change back to upstream quantization dependency

---------

Co-authored-by: timvisee <tim@visee.me>
2023-12-06 17:17:34 +01:00
Ivan Pleshkov
a8d634cc9b Sparse vector grpc configs (#3123)
* sparse vector grpc configs

* basic grpc test

* add todo comment

* fix integration test
2023-12-06 17:16:35 +01:00
Arnaud Gourlay
a9b7cba463 Fix gRPC conversion for named sparse vectors (#3120)
* Fix gRPC conversion for named sparse vectors

* remove debug

* use existing converter
2023-12-06 17:16:02 +01:00
dependabot[bot]
0f9c12ed1b Bump env_logger from 0.10.0 to 0.10.1 (#3095)
Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.10.0 to 0.10.1.
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.10.0...v0.10.1)

---
updated-dependencies:
- dependency-name: env_logger
  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>
2023-12-06 17:13:08 +01:00
Ivan Pleshkov
47690244bc Sparse vector grpc definition (#3070)
* Sparse vector grpc definition

remove obsolete use

update grpc docs

update openapi

more convertion fixes

update grpc docs

* validations

* review renamings

* add todos
2023-12-06 17:11:06 +01:00
timvisee
d8e1290ce6 Revert "bump to tonic 0.10.2 and prost to 0.12.2 (#3068)"
This reverts commit b26c797d6b.
2023-12-06 17:08:54 +01:00
Luis Cossío
dc38661544 bump to tonic 0.10.2 and prost to 0.12.2 (#3068) 2023-12-06 17:08:49 +01:00
Ivan Pleshkov
13f15955fc Sparse vectors rest search and upsert (#3051)
* sparse vector sparse search and upsert

are you happy fmt

fix build

update openapi

batch changes

update openapi

named sparse vector

* review remarks

* cowvalue to cowvector
2023-12-06 17:08:37 +01:00
dependabot[bot]
cac1e4c429 Bump schemars from 0.8.15 to 0.8.16 (#3058)
Bumps [schemars](https://github.com/GREsau/schemars) from 0.8.15 to 0.8.16.
- [Release notes](https://github.com/GREsau/schemars/releases)
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GREsau/schemars/compare/v0.8.15...v0.8.16)

---
updated-dependencies:
- dependency-name: schemars
  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>
2023-12-06 17:07:45 +01:00
dependabot[bot]
f5107a442f Bump tokio from 1.32.0 to 1.34.0 (#3062)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.32.0 to 1.34.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.32.0...tokio-1.34.0)

---
updated-dependencies:
- dependency-name: tokio
  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>
2023-12-06 17:07:41 +01:00
Luis Cossío
3baa33be88 rename context_pairs -> context (#3037) 2023-12-06 17:06:18 +01:00
Andrey Vasnetsov
75f2c8b07b remove overvalidation (#3034) 2023-12-06 17:05:55 +01:00
Andrey Vasnetsov
1fcadcd0c3 Shard key create confirmation (#3027)
* create dedicated API for creating shards with explicit avait on the consensus

* fmt

* update api definitions
2023-12-06 17:04:39 +01:00
Andrey Vasnetsov
2810672598 Huge refactoring to make read requests aware of shard key selector (#3004)
* huge refactoring to make read requests avare of shard key selector

* fix integration test

* review fixes

* allow lookup_from specific shards
2023-12-06 17:02:20 +01:00
dependabot[bot]
315d4833d4 Bump uuid from 1.4.1 to 1.5.0 (#2993)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.4.1...1.5.0)

---
updated-dependencies:
- dependency-name: uuid
  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>
2023-12-06 17:02:05 +01:00
dependabot[bot]
80fe2bc31b Bump tonic-build from 0.10.0 to 0.10.2 (#3001)
Bumps [tonic-build](https://github.com/hyperium/tonic) from 0.10.0 to 0.10.2.
- [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/tonic/compare/v0.10.0...v0.10.2)

---
updated-dependencies:
- dependency-name: tonic-build
  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>
2023-12-06 17:01:48 +01:00
Andrey Vasnetsov
d3aada0e96 Shard key index consistency (#2938)
* WIP: collection-level storage for payload indexe scheme

* introduce consensus-level operation for creating payload index

* make operation_id optional in the UpdateResult

* set payload index in newly created shards

* upd api definitions

* include payload index schema into collection consensus state

* include payload index schema into shard snapshot

* review fixes
2023-12-06 16:59:45 +01:00
Andrey Vasnetsov
816b5a7448 Shard key routing for update requests (#2909)
* add shard_key into output data structures for points

* fmt

* add shard selector for point update operations

* fix creating index without sharding

* Merge serde attributes

* Code review changes

* review fixes

* upd openapi

---------

Co-authored-by: timvisee <tim@visee.me>
2023-12-06 16:58:27 +01:00
Luis Cossío
1184740dcd Improve discovery openapi and grpc comments (#2956)
* improve openapi descriptions

* update grpc docs

* replace em for en dashes with spaces
2023-12-06 16:58:22 +01:00
Luis Cossío
91eb3f36e2 Discovery API (#2861)
* create and connect discovery http and grpc interfaces

* add openapi tests

* fix bad rebase

* Add better descriptions

* remove numpy from openapi tests

* fix rebase artifact

* remove already addressed TODO

* add more tests

* 🤡🔫 (cfg batch handler)

* add timeout query param for discover requests

* More gRPC validation

* make fields pydantic_openapi_generator_v3 friendly

* `context_pairs` -> `context` with struct for pairs

* discovery api is only discovery or context,
move struct description to fields

---------

Co-authored-by: timvisee <tim@visee.me>
2023-12-06 16:57:14 +01:00
Russ Cam
36a7e9d151 Add csharp_namespace option to protos (#2952)
This commit adds the csharp_namespace option to proto files, allowing
the C# gRPC client generated from the protos to be generated with
the namespace used in the official .NET client, without needing to
patch the values in.

Closes qdrant/qdrant-dotnet#3
2023-12-06 16:56:55 +01:00
Luis Cossío
87524275d4 Expose timeout query param for search requests (#2748)
* add timeout query param for search requests

* enable timeout for recommend requests

* Add query timeout for group by requests

* update openapi models

* Don't decrease timeout after recommend preprocessing

* Add openapi test

* code review

* add timeout to individual group by requests, non-decreasing

* handle timeout for discover

* Update timeout field tag in SearchBatchPoints
message
2023-12-06 16:52:49 +01:00
Tim Visée
3999d84b23 Use long timeout for shard snapshot recovery process (#2903)
* Use 24 hour timeout for shard snapshot transfer and recovery on remote

This allows the snapshot transfer and recovery process to take much
longer than before. Now it allows to take up to 24 hours for very large
snapshots over slow connections, while before it only allowed this
process to take 60 seconds.

* Downgrade timeout into `recover_shard_snapshot_from_url`, remove retries
2023-12-06 16:51:40 +01:00
Luis Cossío
0b91a4fcd5 Refactor with_channel_timeout (#2771)
* Remove custom timeout implementation:

- Set very high internal channel timeout
- Intercept requests to set default timeout if not already set

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

* improve From<Status> for CollectionError

* Increase maximum gRPC channel timeout to 24 hours

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: timvisee <tim@visee.me>
2023-12-06 16:51:15 +01:00
Andrey Vasnetsov
a6343ee96b Fix gRPC validation panic on list with multiple failing items (#2888)
* reproduce reported from with gprc panic in batch requests

* Fix validation extension on lists, just return first validation error

The public validator crate interface does not support creating
`ValidationErrors` struct with non-static strings, nor with multiple
errors for a single field. We can therefore not collect multiple errors
from multiple items and must return early on the first error.

* Update test, expect validation error response

---------

Co-authored-by: timvisee <tim@visee.me>
2023-12-06 16:50:36 +01:00
Tim Visée
b1eb5a2a68 Improve shard snapshot transfer replica set state synchronization (#2884)
* Add `WaitForShardState` gRPC call definition

* Implement logic for `WaitForShardState` call

* In next shard snapshot transfer stage, wait for remote to reach `Partial`

* In shard snapshot transfer, synchronize consensus as last step

We don't have to synchronize consensus right away. Instead we just
confirm that the remote shard has reached `Partial` state. Then we
transform the queue proxy shard into the forward proxy.

Right before we finalize the transfer we do want to synchronize
consensus. First make sure the shard has reached `Partial` state in our
local replica set. Then synchronize all other nodes to make sure they
reach at least the same consensus state.

* Reformat internal collection service definition
2023-12-06 16:49:49 +01:00
Tim Visée
5bdf5e4bfe Shard snapshot transfer integration (#2467)
* Clone inside blocks

* Add shard transfer method to distinguish between batching and snapshots

* Add stub method to drive snapshot transfer

* Store remote shard in forward proxy, merge unproxy methods

* On snapshot shard transfer, create a shard snapshot

* Unify logic for unproxifying forward and queue proxy

* Error snapshot transfer if shard is not a queue proxy

* Add remote shard function to request remote HTTP port

* Handle all specific shard types when proxifying

* Allow queue proxy for some shard holder snapshot methods

* Bring local and remote shard snapshot transfer URLs into transfer logic

* Expose optional shard transfer method parameter in REST and gRPC API

* Expose shard transfer method in list of active transfers

* Fix off-by-one error in queue proxy shard batch transfer logic

* Do not set max ack version for WAL twice, already set when finalizing

* Merge comment for two similar calls

* Use reqwest client to transfer and recover shard snapshot on remote

Using the reqwest client should be temporary. We better switch to a gRPC
call here eventually to use our existing channels. That way we don't
require an extra HTTP client (and dependency) just for this.

* Send queue proxy updates to remote when shard is transferred

* On shard queue transfer, set max WAL ack to last transferred

* Add safe queue proxy destructor, skip destructing in error

This adds a finalize method to safely destruct a queue proxy shard. It
ensures that all remaining updates are transferred to the remote, and
that the max acknowledged version for our WAL is released. Only then is
the queue proxy shard destructed unwrapping the inner local shard.

Our unproxify logic now ensures that the queue proxy shard remains if
transferring the updates fails.

* Clean up method driving shard snapshot transfer a bit

* Change default shard transfer method to stream records

This changes the default transfer method to stream records rather than
using a snaphsot transfer. We can switch this once snapshot transfer is
fully integrated.

* Improve error handling, don't panic but return proper error

* Do not unwrap in type conversions

* Update OpenAPI and gRPC specification

* Resolve and remove some TODOs

* During shard snapshot transfer, use REST port from config

* Always release max acknowledged WAL version on queue proxy finalize

* Rework queue unproxying, transform into forward proxy to handle errors

When a queue or forward proxy shard needs to be unproxified into a local
shard again we typically don't have room to handle errors. A queue proxy
shard may error if it fails to send updates to the remote shard, while a
forward proxy does not fail at all when transforming.

We now transfer queued updates before a shard is unproxified. This
allows for proper error handling. After everything is transferred the
shard is transformed into a forward proxy which can eventually be safely
unproxified later.

* Add trace logging for transferring queue proxy updates in batch

* Simplify snapshot method conversion from gRPC

* Remove remote shard parameter

* Add safe guard to queue proxy handler, panic in debug if not finalized

* Improve safety and architecture of queue proxy shard

Switch from an explicit finalized flag to an outer-inner architecture.
This improves the interface and robustness of the type.

* Do not panic on drop if already unwinding

* Make REST port interface in channel service for local node explicitly

* Recover shard on remote over gRPC, remove reqwest client

* Use shard transfer priority for shard snapshot recovery

* Remove obsolete comment

* Simplify qualified path with use

* Don't construct URLs ourselves as a string, use `parse` and `set_port`

* Use `set_path` when building shard download URL

* Fix error handling in queue to forward proxy transformation

Before, we didn't handle finalization errors properly. If this failed,
tie shard would be lost.  With this change the queue proxy shard is put
back.

* Set default shard transfer method to stream records, eliminate panics

* Fix shard snapshot transfer not correctly aborting due to queue proxy

When a shard transfer fails (for any reason), the transfer is aborted.
If we still have a queue proxy shard it should also be reverted, and
collected updates should be forgotten. Before this change it would try
to send all collected updates to the remote, even if the transfer
failed.

* Review fixes

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

* Review fixes

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

* Initiate forward and queue proxy shard in specialized transfer methods

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

* Add consensus interface to shard transfer, repurpose dispatcher (#2873)

* Add shard transfer consensus interface

* Integrate shard transfer consensus interface into toc and transfer logic

* Repurpose dispatcher for getting consensus into shard transfer

* Derive clone

* Mark consensus as unused for now

* Use custom dispatcher with weak ref to prevent Arc cycle for ToC

* Add comment on why a weak reference is used

* Do exhaustive match in shard unproxy logic

* Restructure match statement, use match if

* When queue proxifying shard, allow forward proxy state if same remote

* Before retrying a shard transfer after error, destruct queue proxy

* Synchronize consensus across all nodes for shard snapshot transfer (#2874)

* Move await consensus commit functions into channel service

* Add shard consensus method to synchronize consensus across all nodes

* Move transfer config, channels and local address into snapshot transfer

* Await other nodes to reach consensus before finalizing shard transfer

* Do not fail right away awaiting consensus if still on older term

Instead, give the node time to reach the same term.

* Fix `await_commit_on_all_peers` not catching peer errors properly

* Change return type of `wait_for_consensus_commit` to `Result`

This is of course more conventional, and automatically sets `must_use`.

* Explicitly note number of peers when awaiting consensus

* Before consensus sync, wait for local shard to reach partial state

* Fix timeout error handling when waiting for replica set state

* Wait for replica set to have remote in partial state instead

* Set `(Partial)Snapshot` states for shard snapshot transfer through consensus (#2881)

* When doing a shard snapshot transfer, set shard to `PartialSnapshot`

* Add shard transfer method to set shard state to partial

It currently uses a naive implementation. Using a custom consensus
operation to also confirm a transfer is still active will be implemented
later.

* Add consensus snapshot transfer operation to change shard to partial

The operation `ShardTransferOperations::SnapshotRecovered` is called
after the shard snapshot is recovered on the remote and it progresses
the transfer further.

The operation sets the shard state from `PartialSnapshot` to `Partial`
and ensures the transfer is still active.

* Confirm consensus put shard into partial state, retry 3 times

* Get replica set once

* Add extensive shard snapshot transfer process docs, clean up function

* Fix typo

* Review suggestion

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

* Add delay between consensus confirmation retries

* Rename retry timeout to retry delay

---------

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

* On replicate shard, remember specified method

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
2023-12-06 16:49:40 +01:00