├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── something-else.md ├── PULL_REQUEST_TEMPLATE │ ├── bug_fix.md │ ├── feature.md │ └── something-else.md └── workflows │ └── ci.yml ├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Cargo.toml ├── LICENSE ├── README.md ├── benches ├── benches.rs └── suites │ ├── mod.rs │ ├── progress.rs │ ├── raft.rs │ └── raw_node.rs ├── bors.toml ├── datadriven ├── Cargo.toml └── src │ ├── datadriven.rs │ ├── datadriven │ └── datadriven_test.rs │ ├── lib.rs │ ├── line_sparser.rs │ ├── test_data.rs │ ├── test_data_reader.rs │ └── testdata │ ├── datadriven │ ├── datadriven_1.txt │ └── datadriven_2.txt │ ├── multiline │ ├── rewrite │ ├── basic-after │ ├── basic-before │ ├── eof-1-after │ ├── eof-1-before │ ├── eof-2-after │ └── eof-2-before │ ├── unknown_data_1.txt │ └── unknown_data_2.txt ├── examples ├── five_mem_node │ └── main.rs └── single_mem_node │ └── main.rs ├── harness ├── Cargo.toml ├── src │ ├── interface.rs │ ├── lib.rs │ └── network.rs └── tests │ ├── failpoints_cases │ └── mod.rs │ ├── integration_cases │ ├── mod.rs │ ├── test_raft.rs │ ├── test_raft_flow_control.rs │ ├── test_raft_paper.rs │ ├── test_raft_snap.rs │ └── test_raw_node.rs │ ├── test_util │ └── mod.rs │ └── tests.rs ├── media └── the-design-of-raft-rs.png ├── proto ├── Cargo.toml ├── README.md ├── build.rs ├── proto │ └── eraftpb.proto └── src │ ├── confchange.rs │ ├── confstate.rs │ └── lib.rs └── src ├── confchange.rs ├── confchange ├── changer.rs ├── datadriven_test.rs ├── restore.rs └── testdata │ ├── joint_autoleave.txt │ ├── joint_idempotency.txt │ ├── joint_learners_next.txt │ ├── joint_safety.txt │ ├── simple_idempotency.txt │ ├── simple_promote_demote.txt │ ├── simple_safety.txt │ └── zero.txt ├── config.rs ├── errors.rs ├── lib.rs ├── log_unstable.rs ├── quorum.rs ├── quorum ├── datadriven_test.rs ├── joint.rs ├── majority.rs └── testdata │ ├── joint_commit.txt │ ├── joint_group_commit.txt │ ├── joint_vote.txt │ ├── majority_commit.txt │ └── majority_vote.txt ├── raft.rs ├── raft_log.rs ├── raw_node.rs ├── read_only.rs ├── status.rs ├── storage.rs ├── tracker.rs ├── tracker ├── inflights.rs ├── progress.rs └── state.rs └── util.rs /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/.github/ISSUE_TEMPLATE/bug_report.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/.github/ISSUE_TEMPLATE/feature_request.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/something-else.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Something Else 3 | about: Just give me a text box! 4 | --- 5 | 6 | 7 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/bug_fix.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/.github/PULL_REQUEST_TEMPLATE/bug_fix.md -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/feature.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/.github/PULL_REQUEST_TEMPLATE/feature.md -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/something-else.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Something Else 3 | about: Just give me a text box! 4 | 5 | --- 6 | 7 | 8 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/.gitignore -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/Cargo.toml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/README.md -------------------------------------------------------------------------------- /benches/benches.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/benches/benches.rs -------------------------------------------------------------------------------- /benches/suites/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/benches/suites/mod.rs -------------------------------------------------------------------------------- /benches/suites/progress.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/benches/suites/progress.rs -------------------------------------------------------------------------------- /benches/suites/raft.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/benches/suites/raft.rs -------------------------------------------------------------------------------- /benches/suites/raw_node.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/benches/suites/raw_node.rs -------------------------------------------------------------------------------- /bors.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/bors.toml -------------------------------------------------------------------------------- /datadriven/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/Cargo.toml -------------------------------------------------------------------------------- /datadriven/src/datadriven.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/datadriven.rs -------------------------------------------------------------------------------- /datadriven/src/datadriven/datadriven_test.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/datadriven/datadriven_test.rs -------------------------------------------------------------------------------- /datadriven/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/lib.rs -------------------------------------------------------------------------------- /datadriven/src/line_sparser.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/line_sparser.rs -------------------------------------------------------------------------------- /datadriven/src/test_data.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/test_data.rs -------------------------------------------------------------------------------- /datadriven/src/test_data_reader.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/test_data_reader.rs -------------------------------------------------------------------------------- /datadriven/src/testdata/datadriven/datadriven_1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/testdata/datadriven/datadriven_1.txt -------------------------------------------------------------------------------- /datadriven/src/testdata/datadriven/datadriven_2.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/testdata/datadriven/datadriven_2.txt -------------------------------------------------------------------------------- /datadriven/src/testdata/multiline: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/testdata/multiline -------------------------------------------------------------------------------- /datadriven/src/testdata/rewrite/basic-after: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/testdata/rewrite/basic-after -------------------------------------------------------------------------------- /datadriven/src/testdata/rewrite/basic-before: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/testdata/rewrite/basic-before -------------------------------------------------------------------------------- /datadriven/src/testdata/rewrite/eof-1-after: -------------------------------------------------------------------------------- 1 | # Case where the last directive has blank output. 2 | noop 3 | ---- 4 | -------------------------------------------------------------------------------- /datadriven/src/testdata/rewrite/eof-1-before: -------------------------------------------------------------------------------- 1 | # Case where the last directive has blank output. 2 | noop 3 | ---- -------------------------------------------------------------------------------- /datadriven/src/testdata/rewrite/eof-2-after: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/testdata/rewrite/eof-2-after -------------------------------------------------------------------------------- /datadriven/src/testdata/rewrite/eof-2-before: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/testdata/rewrite/eof-2-before -------------------------------------------------------------------------------- /datadriven/src/testdata/unknown_data_1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/testdata/unknown_data_1.txt -------------------------------------------------------------------------------- /datadriven/src/testdata/unknown_data_2.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/datadriven/src/testdata/unknown_data_2.txt -------------------------------------------------------------------------------- /examples/five_mem_node/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/examples/five_mem_node/main.rs -------------------------------------------------------------------------------- /examples/single_mem_node/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/examples/single_mem_node/main.rs -------------------------------------------------------------------------------- /harness/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/harness/Cargo.toml -------------------------------------------------------------------------------- /harness/src/interface.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/harness/src/interface.rs -------------------------------------------------------------------------------- /harness/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/harness/src/lib.rs -------------------------------------------------------------------------------- /harness/src/network.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/harness/src/network.rs -------------------------------------------------------------------------------- /harness/tests/failpoints_cases/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/harness/tests/failpoints_cases/mod.rs -------------------------------------------------------------------------------- /harness/tests/integration_cases/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/harness/tests/integration_cases/mod.rs -------------------------------------------------------------------------------- /harness/tests/integration_cases/test_raft.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/harness/tests/integration_cases/test_raft.rs -------------------------------------------------------------------------------- /harness/tests/integration_cases/test_raft_flow_control.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/harness/tests/integration_cases/test_raft_flow_control.rs -------------------------------------------------------------------------------- /harness/tests/integration_cases/test_raft_paper.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/harness/tests/integration_cases/test_raft_paper.rs -------------------------------------------------------------------------------- /harness/tests/integration_cases/test_raft_snap.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/harness/tests/integration_cases/test_raft_snap.rs -------------------------------------------------------------------------------- /harness/tests/integration_cases/test_raw_node.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/harness/tests/integration_cases/test_raw_node.rs -------------------------------------------------------------------------------- /harness/tests/test_util/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/harness/tests/test_util/mod.rs -------------------------------------------------------------------------------- /harness/tests/tests.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/harness/tests/tests.rs -------------------------------------------------------------------------------- /media/the-design-of-raft-rs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/media/the-design-of-raft-rs.png -------------------------------------------------------------------------------- /proto/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/proto/Cargo.toml -------------------------------------------------------------------------------- /proto/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/proto/README.md -------------------------------------------------------------------------------- /proto/build.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/proto/build.rs -------------------------------------------------------------------------------- /proto/proto/eraftpb.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/proto/proto/eraftpb.proto -------------------------------------------------------------------------------- /proto/src/confchange.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/proto/src/confchange.rs -------------------------------------------------------------------------------- /proto/src/confstate.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/proto/src/confstate.rs -------------------------------------------------------------------------------- /proto/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/proto/src/lib.rs -------------------------------------------------------------------------------- /src/confchange.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/confchange.rs -------------------------------------------------------------------------------- /src/confchange/changer.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/confchange/changer.rs -------------------------------------------------------------------------------- /src/confchange/datadriven_test.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/confchange/datadriven_test.rs -------------------------------------------------------------------------------- /src/confchange/restore.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/confchange/restore.rs -------------------------------------------------------------------------------- /src/confchange/testdata/joint_autoleave.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/confchange/testdata/joint_autoleave.txt -------------------------------------------------------------------------------- /src/confchange/testdata/joint_idempotency.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/confchange/testdata/joint_idempotency.txt -------------------------------------------------------------------------------- /src/confchange/testdata/joint_learners_next.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/confchange/testdata/joint_learners_next.txt -------------------------------------------------------------------------------- /src/confchange/testdata/joint_safety.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/confchange/testdata/joint_safety.txt -------------------------------------------------------------------------------- /src/confchange/testdata/simple_idempotency.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/confchange/testdata/simple_idempotency.txt -------------------------------------------------------------------------------- /src/confchange/testdata/simple_promote_demote.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/confchange/testdata/simple_promote_demote.txt -------------------------------------------------------------------------------- /src/confchange/testdata/simple_safety.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/confchange/testdata/simple_safety.txt -------------------------------------------------------------------------------- /src/confchange/testdata/zero.txt: -------------------------------------------------------------------------------- 1 | # NodeID zero is ignored. 2 | simple 3 | v1 r0 v0 l0 4 | ---- 5 | voters=(1) 6 | 1: StateProbe match=0 next=0 7 | -------------------------------------------------------------------------------- /src/config.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/config.rs -------------------------------------------------------------------------------- /src/errors.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/errors.rs -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/lib.rs -------------------------------------------------------------------------------- /src/log_unstable.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/log_unstable.rs -------------------------------------------------------------------------------- /src/quorum.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/quorum.rs -------------------------------------------------------------------------------- /src/quorum/datadriven_test.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/quorum/datadriven_test.rs -------------------------------------------------------------------------------- /src/quorum/joint.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/quorum/joint.rs -------------------------------------------------------------------------------- /src/quorum/majority.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/quorum/majority.rs -------------------------------------------------------------------------------- /src/quorum/testdata/joint_commit.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/quorum/testdata/joint_commit.txt -------------------------------------------------------------------------------- /src/quorum/testdata/joint_group_commit.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/quorum/testdata/joint_group_commit.txt -------------------------------------------------------------------------------- /src/quorum/testdata/joint_vote.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/quorum/testdata/joint_vote.txt -------------------------------------------------------------------------------- /src/quorum/testdata/majority_commit.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/quorum/testdata/majority_commit.txt -------------------------------------------------------------------------------- /src/quorum/testdata/majority_vote.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/quorum/testdata/majority_vote.txt -------------------------------------------------------------------------------- /src/raft.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/raft.rs -------------------------------------------------------------------------------- /src/raft_log.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/raft_log.rs -------------------------------------------------------------------------------- /src/raw_node.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/raw_node.rs -------------------------------------------------------------------------------- /src/read_only.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/read_only.rs -------------------------------------------------------------------------------- /src/status.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/status.rs -------------------------------------------------------------------------------- /src/storage.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/storage.rs -------------------------------------------------------------------------------- /src/tracker.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/tracker.rs -------------------------------------------------------------------------------- /src/tracker/inflights.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/tracker/inflights.rs -------------------------------------------------------------------------------- /src/tracker/progress.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/tracker/progress.rs -------------------------------------------------------------------------------- /src/tracker/state.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/tracker/state.rs -------------------------------------------------------------------------------- /src/util.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikv/raft-rs/HEAD/src/util.rs --------------------------------------------------------------------------------