mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 11:10:40 +00:00
We begin by preparing the `persistence` class so that the storage can be reused across different Raft server instances: the test keeps a shared pointer to the storage so that when a server stops, a new server with the same ID can be reconstructed with this storage. We then modify `environment` so that server instances can be removed and replaced in middle of operations. Finally we prepare a nemesis operation which gracefully stops or immediately crashes a randomly picked server and run this operation periodically in `basic_generator_test`. One important change that changes the API of `raft::server` is included: the metrics are not automatically registered in `start()`. This is because metric registration modifies global data structures, which cannot be done twice with the same set of metrics (and we would do it when we restart a server with the same ID). Instead, `register_metrics()` is exposed in the `raft::server` interface to be called when running servers in production. * kbr/crashes-v3: raft: server: print the ID of aborted server test: raft: randomized_nemesis_test: run stop_crash nemesis in `basic_generator_test` test: raft: randomized_nemesis_test: introduce `stop_crash` operation test: raft: randomized_nemesis_test: environment: implement server `stop` and `crash` raft: server: don't register metrics in `start()` test: raft: randomized_nemesis_test: raft_server: return `stopped_error` when called during abort test: raft: randomized_nemesis_test: handle `raft::stopped_error` test: raft: randomized_nemesis_test: handle missing servers in `environment` call functions test: raft: randomized_nemesis_test: environment: split `new_server` into `new_node` and `start_server` test: raft: randomized_nemesis_test: remove `environment::get_server` test: raft: randomized_nemesis_test: construct `persistence_proxy` outside `raft_server<M>::create` test: raft: randomized_nemesis_test: persistence_proxy: store a shared pointer to `persistence` test: raft: randomized_nemesis_test: persistence: split into two classes test: raft: logical_timer: introduce `sleep_until`