Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
Turn off auto-recovery-by-default during integration tests
Browse files Browse the repository at this point in the history
This commit only changes the test suite.

It turns off the auto-recovery behavior of automatically re-trying to load the
data directory in case `RAFT_CORRUPT` is hit by `raft_io->load()`.

Instead, tests now have to explicitly turn on auto-recovery if they want to
enable that behavior.

This reduces the risk of inadvertently masking bugs, for example by having tests
that only pass because auto-recovery is on, but would otherwise fail.

Note that auto-recovery is a best-effort and last-resort measure to prevent
startup failures possibly caused by raft bugs that have left a broken state at
shutdown. However it's something that we don't expect to happen, and this
features comes at the cost of possible data loss. We should then normally turn
it off in our tests, in order to catch bugs, and only turn it on in some tests
in order to exercise the auto-recovery feature itself.

Signed-off-by: Free Ekanayaka <[email protected]>
  • Loading branch information
freeekanayaka committed Jul 19, 2023
1 parent 87172dd commit a713f58
Show file tree
Hide file tree
Showing 2 changed files with 181 additions and 178 deletions.
Loading

0 comments on commit a713f58

Please sign in to comment.