Debian Codegraph @

chaos/README.md

raw symbols SCIP
1
2 Chaos test for dsync
3 ====================
4
5 This directory contains various sorts of 'chaos' tests for dsync. For instance it simulates the locking process is uneffected while servers that participate in the locking process go down and come back up again.
6
7 Tests
8 -----
9
10 This is a list of cases being tested:
11 - **`testNotEnoughServersForQuorum`**: verifies that when quorum cannot be achieved that locking will block
12 - **`testServerGoingDown`**: tests that a lock is granted when all servers are up, after too many servers die that a new lock will block and once servers are up again, the lock is granted
13 - **`testSingleServerOverQuorumDownDuringLock`**: verifies that if a server goes down while a lock is held, and comes back later another lock on the same name is not granted too early
14 - **`testSingleStaleLock`**: verifies that, despite a single stale lock, a new lock can still be acquired on same resource
15 - **`testMultipleStaleLocks`**: verifies that (before maintenance kicks in) multiple stale locks will prevent a new lock from being granted; and (after maintenance has happened) multiple stale locks not will prevent a new lock from being granted
16 - **`testClientThatHasLockCrashes`**: verifies that (after a lock maintenance loop) multiple stale locks will not prevent a new lock on same resource
17 - **`testTwoClientsThatHaveReadLocksCrash`**: like testClientThatHasLockCrashes but with two clients having read locks
18 - **`testWriterStarvation`**: tests that a separate implementation using a pair of two DRWMutexes can prevent writer starvation (due to too many read locks)
19
20 Known error cases
21 -----------------
22
23 - **`testMultipleServersOverQuorumDownDuringLockKnownError`**: verifies that if multiple servers go down while a lock is held, and come back later another lock on the same name is granted too early
24
25 Building
26 --------
27
28 ```
29 $ cd chaos
30 $ go build
31 ```
32
33 Running
34 -------
35
36 ```
37 $ ./chaos
38 ```
39
40 If it warns about the following
41
42 ```
43 Found more than one chaos process. Killing all and exiting
44 ```
45
46 it has found more than one chaos process (most likely a left over from a previous run of the program), simply repeat the `./chaos` command to try again.