forked from scylladb/scylladb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge "test: raft: randomized_nemesis_test: introduce server stop/cra…
…sh nemesis" from Kamil 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`
- Loading branch information
Showing
6 changed files
with
454 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.