mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-02 22:25:48 +00:00
The test enables an error injection inside the Raft upgrade procedure on one of the nodes which will cause the node to throw an exception before entering `synchronize` state. Then it restarts other nodes with Raft enabled, waits until they enter `synchronize` state, puts them in RECOVERY mode, removes the error-injected node and creates a new Raft group 0. As soon as the other nodes enter `synchronize`, the test disabled the error injection (the rest of the test was outside the `async with inject_error(...)` block). There was a small chance that we disabled the error injection before the node reached it. In that case the node also entered `synchronize` and the cluster managed to finish the upgrade procedure. We encountered this during next promotion. Eliminate this possibility by extending the scope of the `async with inject_error(...)` block, so that the RECOVERY mode steps on the other nodes are performed within that block. Closes #12162