Files
qdrant/lib/common
Roman Titov b60fde6ffc Make shard snapshot methods and API cancel-safe (#2870)
* WIP: Make shard snapshot methods and API to be safely cancellable

* WIP: Annotate all shard snapshot API methods if they are safe to cancel...

...and what should be done to make them so

* WIP: Fix/clarify annotations for methods that can't be made safe to cancel

* WIP: Further clarify cancel-safe annotations

* Make shard snapshot methods cancel-safe...

...or annotate and propagate cancellation tokens to them

* Fix spelling

* Explicitly cancel snapshot archive task in `ShardHolder::create_shard_snapshot`

* WIP: Make `recover_shard_snapshot`/`upload_shard_snapshot` API cancel-safe

* Make `recover_shard_snapshot`/`upload_shard_snapshot` API cancel-safe

* Add `common/cancel-safe` sub-crate

* Cleanup

* Rename `cancel-safe` sub-crate to `cancel`...

...and rename methods to have more meaningful names

* fixup! Rename `cancel-safe` sub-crate to `cancel`...

* Remove explicit `tokio-util` dependency from the `qdrant` crate

`common/cancel` re-exports important parts anyway

* Documentation fixes

* Do not cancel request processing if request is dropped

* Rename `common/cancel` APIs

* Fix (or drop) some TODOs

* Fix `clippy` and `cargo fmt`

* fixup! Rename `common/cancel` APIs

Fix typo

* Improve documentation and comments

* Fix failing shard snapshot API test

* Use conventional cancel safety notes

---------

Co-authored-by: timvisee <tim@visee.me>
2023-11-02 12:25:08 +01:00
..
2023-10-04 14:39:52 +02:00
2023-10-04 14:39:52 +02:00