mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-08 16:03:20 +00:00
The implementation of `rpc` may wait for all snapshot applications to finish before it can finish aborting. This is what the randomized_nemesis_test implementation did. This caused rpc abort to hang in some scenarios. In this commit, the order of abort calls is modified a bit. Instead of waiting for rpc abort to finish and then aborting existing snapshot applications, we call `rpc::abort()` and keep the future, then abort snapshot applications, then wait on the future. Calling `rpc::abort()` first is supposed to prevent new snapshot applications from starting; a comment was added at the interface definition. The nemesis test implementation had this property, and `raft_rpc` in group registry was adjusted appropriately. Aborting the snapshot applications then allows `rpc::abort()` to finish.