From 68b90ec42de9f085a07830de760727f4b3f6d3a1 Mon Sep 17 00:00:00 2001 From: Markus Alexander Kuppe Date: Wed, 27 Dec 2023 22:57:33 +0000 Subject: [PATCH] Raft scenarios falsifying Heidi's hypothesis about raft.h's behavior. Execute with: ```shell .../build $ python3 ../tests/raft_scenarios_runner.py ./raft_driver ../tests/raft_scenarios/5879_deprecated ``` --- tests/raft_scenarios/5879_deprecated | 65 ++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 tests/raft_scenarios/5879_deprecated diff --git a/tests/raft_scenarios/5879_deprecated b/tests/raft_scenarios/5879_deprecated new file mode 100644 index 000000000000..360965332335 --- /dev/null +++ b/tests/raft_scenarios/5879_deprecated @@ -0,0 +1,65 @@ +nodes,0,1 +connect,0,1 + +# Node 0 starts first, and begins sending messages first +periodic_one,0,110 +dispatch_all + +periodic_all,30 +dispatch_all + +state_all +assert_is_primary,0 +assert_is_backup,1 + +## ... with the same logs upto index 7. +replicate,1,txAtIdx1 +replicate,1,txAtIdx2 +replicate,1,txAtIdx3 +replicate,1,txAtIdx4 +replicate,1,txAtIdx5 +replicate,1,txAtIdx6 +emit_signature,1 +periodic_all,30 +dispatch_all + +assert_commit_idx,0,7 +assert_commit_idx,1,0 + +periodic_all,30 +dispatch_all +assert_state_sync + +assert_commit_idx,0,7 +assert_commit_idx,1,7 + +## At index 8, the leader n2 reconfigures to remove n1. +replicate_new_configuration,1,0 + +periodic_all,30 +dispatch_all + +state_all +assert_is_primary,0 +assert_is_backup,1 +## Index 9 is a signature, index 10 some random transaction and index 11 is a signature. +emit_signature,1 +assert_commit_idx,0,7 + +replicate,1,txAt10 +assert_commit_idx,0,7 + +emit_signature,1 +assert_commit_idx,0,7 + + +## When the ACI action taken by n2, it should be able to commit index 11 but instead it will commit index 9. +periodic_all,30 +dispatch_all + +assert_is_primary,0 +assert_is_backup,1 +assert_is_retired,1 + +assert_commit_idx,0,11 +assert_commit_idx,1,7