@@ -12,65 +12,146 @@ transactional anomalies up to strict serializability.
1212We include a wide variety of faults, including network partitions, process
1313crashes, pauses, clock skew, and membership changes.
1414
15- ## Prerequisites
15+ ## How to use
16+
17+ ### Prerequisites
1618
1719You'll need a Jepsen cluster running Ubuntu, which you can either [ build
1820yourself] ( https://github.com/jepsen-io/jepsen#setting-up-a-jepsen-environment )
1921or run in
2022[ AWS] ( https://aws.amazon.com/marketplace/pp/B01LZ7Y7U0?qid=1486758124485&sr=0-1&ref_=srh_res_product_title )
2123via Cloudformation.
2224
23- The control node needs a JVM, Graphviz, and the [ Leiningen
24- build system] ( https://github.com/technomancy/leiningen#installation ) . The first
25- two you can get (on Ubuntu) via:
25+ The control node needs:
26+
27+ - A JVM with version 1.8 or higher.
28+ - JNA, so the JVM can talk to your SSH.
29+ - (optional) Gnuplot, that helps Jepsen renders performance plots.
30+ - (optional) Graphviz, that helps Jepsen renders transactional anomalies.
31+
32+ These dependencies you can get (on Ubuntu) via:
2633
2734``` shell
28- sudo apt install openjdk8-jdk graphviz
35+ sudo apt install -y openjdk8-jdk graphviz gnuplot
2936```
3037
31- Jepsen will automatically install dependencies (e.g. ` git ` , build tools,
32- various support libraries) on DB nodes, and clone and install Tarantool locally
33- on each DB node .
38+ Jepsen will install dependencies (e.g. ` git ` , build tools, various support
39+ libraries) as well as Tarantool itself automatically on all DB nodes
40+ participated in test .
3441
35- ## Usage
42+ ### Usage
3643
37- To get started, try
44+ Tests distributed as a JAR file suitable for running with JVM. Release
45+ archives with JAR file, shell script for running JAR file, CHANGELOG.md and
46+ README.md are
47+ [ published] ( https://github.com/tarantool/jepsen.tarantool/releases ) for every
48+ release. Before start one can download archive for latest release and unpack
49+ it.
3850
39- ```
40- lein run test --nodes-file nodes
51+ To see all options and their default values, try
52+
53+ ``` sh
54+ ./run-jepsen test --help
4155```
4256
43- To test a particular version of Tarantool, pass ` --version ` . It accepts two
44- kind of versions: branch version (for example 2.2) to use a latest version
45- of package from this branch and GIT commit hash to use version built on this
46- commit. You may also want to provide a custom ` --time-limit ` for each test. To
47- run several iterations of each test, use ` --test-count ` . A thorough test run
48- might look like:
57+ To run test ` register ` with Tarantool 2.8 10 times during 600 seconds, try:
4958
59+ ``` sh
60+ ./run-jepsen test --username root --nodes-file nodes --workload register
61+ --version 2.8 --time-limit 600 --test-count 10
5062```
51- lein run test --username root --nodes-file nodes --workload register --version 2.8 --time-limit 600 --test-count 10
52- lein run test --nodes-file node --engine vinyl --workload set --concurrency 20 --time-limit 100
63+
64+ To run test ` set ` with Tarantool built using source code in master branch
65+ during 100 seconds with 20 threads, try:
66+
67+ ``` sh
68+ ./run-jepsen test --nodes-file node --engine vinyl --workload set
69+ --concurrency 20 --time-limit 100
5370```
5471
5572To focus on a particular set of faults, use ` --nemesis `
5673
74+ ``` sh
75+ ./run-jepsen test --nemesis partition,kill
5776```
58- lein run test --nemesis partition,kill
77+
78+ ### Options
79+
80+ - ` --concurrency ` - how many workers should we run? Must be an integer,
81+ optionally followed by n (e.g. 3n) to multiply by the number of nodes.
82+ - ` --engine ` - what Tarantool data engine should we use? Available values are
83+ ` memtx ` and ` vinyl ` . Learn more about DB engines in Tarantool documentation.
84+ - ` --leave-db-running ` - leave the database running at the end of the test, so
85+ you can inspect it. Useful for debugging.
86+ - ` --logging-json ` - use JSON structured output in the Jepsen log.
87+ - ` --mvcc ` - enable MVCC engine, learn more about it in Tarantool
88+ [ documentation] ( https://www.tarantool.io/en/doc/latest/book/box/atomic/#atomic-transactional-manager ) .
89+ - ` --nemesis ` - a comma-separated list of nemesis faults or groups of faults to
90+ enable. Nemeses groups are: ` none ` with none nemeses, ` standard ` includes
91+ ` partition ` and ` clock ` , ` all ` includes all nemeses listed below. Available
92+ nemeses are:
93+ - `clock` generates a nemesis which manipulates clocks.
94+ - `pause` pauses and resumes a DB's processes using `SIGSTOP` and `SIGCONT` signals.
95+ - `kill` kills a DB's processes using `SIGKILL` signal.
96+ - `partition` splits network connectivity for nodes in a cluster and then recover it.
97+ - ` --nemesis-interval ` - how long to wait between nemesis faults.
98+ - ` --node ` - node(s) to run test on. Flag may be submitted many times, with one
99+ node per flag.
100+ - ` --nodes ` - comma-separated list of node hostnames.
101+ - ` --nodes-file ` - file containing node hostnames, one per line.
102+ - ` --username ` - username for login to remote server via SSH.
103+ - ` --password ` - password for sudo access on remote server.
104+ - ` --strict-host-key-checking ` - whether to check host keys.
105+ - ` --ssh-private-key ` - path to an SSH identity file.
106+ - ` --test-count ` - how many times should we repeat a test?
107+ - ` --time-limit ` - excluding setup and teardown, how long should a test run
108+ for, in seconds?
109+ - ` --version ` - what Tarantool version should we test? Option accepts two kind
110+ of versions: branch version (for example 2.2) to use a latest version of
111+ package from this branch or GIT commit hash to use version built on this
112+ commit.
113+ - ` --workload ` - test workload to run. Available workloads are:
114+ - ` bank ` simulates transfers between bank accounts. Uses SQL to access to
115+ bank accounts.
116+ - ` bank-multitable ` simulates transfers between bank accounts when each
117+ account is in a separate space (table). Uses SQL to access to bank accounts.
118+ - ` bank-lua ` simulates transfers between bank accounts. Uses Lua functions
119+ to access to bank accounts.
120+ - ` bank-multitable-lua ` simulates transfers between bank accounts when each
121+ account is in a separate space (table). Uses Lua functions to access to
122+ bank accounts.
123+ - ` counter-inc ` increments a counter.
124+ - ` register ` models a register with read, write and CAS (Compare-And-Set)
125+ operations.
126+ - ` set ` inserts a series of unique numbers as separate instances, one per
127+ transaction, and attempts to read them back through an index.
128+
129+ ## How to build
130+
131+ For building Jepsen tests locally one need to setup [ Leiningen build
132+ system] ( https://github.com/technomancy/leiningen#installation ) and
133+ [ Clojure] ( https://clojure.org/guides/getting_started ) .
134+
135+ For building tests, try:
136+
137+ ``` sh
138+ lein deps
139+ lein compile
59140```
60141
61- To see all options , try
142+ For running tests , try:
62143
63- ```
64- lein run test --help
144+ ``` sh
145+ lein run test --nodes-file nodes --workload register --version 2.8 --time-limit 100
65146```
66147
67148## License
68149
69- Copyright © 2020-2021 Mail.Ru Group Ltd
150+ Copyright © 2020-2021 VK Company Limited
70151
71152This program and the accompanying materials are made available under the
72153terms of the Eclipse Public License 2.0 which is available at
73- http ://www.eclipse.org/legal/epl-2.0 .
154+ https ://www.eclipse.org/legal/epl-2.0 .
74155
75156This Source Code may also be made available under the following Secondary
76157Licenses when the conditions for such availability set forth in the Eclipse
0 commit comments