Files
Roman Titovandgenerall a5818e9211 Fix shard state desync during shard transfer (#2373)
* Refactor `LockedShardHolder` from newtype to a type alias...

...to allow using `read_owned`/`write_owned` methods of `RwLock`

* WIP: Refactor `initiate_local_partial_shard` into `initiate_shard_transfer`

`initiate_shard_transfer` waits until appropriate `ShardTransferOperations::Start`
event is received from the consensus (and local shard is switched into `Partial` state)
before allowing shard transfer to start (instead of forcibly setting local shard
into `Partial` state)

TODO:
- Document `initiate_shard_transfer`
- Add descriptive error messages in `initiate_shard_transfer`

* Fix copy-pasted error message in `sync_local_state`

* fixup! WIP: Refactor `initiate_local_partial_shard` into `initiate_shard_transfer`

`cargo clippy`/`cargo fmt`

* Add descriptive error messages to `initiate_shard_transfer`

* Do not lock `collections` hash map while `initiate_shard_transfer` is resolving

* drop collection lock

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2023-08-02 16:27:54 +02:00
..
2023-07-24 12:45:33 +02:00