Jepsen mysql_go-jepsen 用于分布式系统验证的工具集(仅限于MySQL协议)

68747470733a2f2f7472617669732d63692e6f72672f78656c6162732f676f2d6a657073656e2e7376673f6272616e63683d6d617374657268747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f78656c6162732f676f2d6a657073656e68747470733a2f2f636f6465636f762e696f2f67682f78656c6162732f676f2d6a657073656e2f6772617068732f62616467652e737667

go-jepsen

go-jepsen is a toolset for distributed systems verification(MySQL protocol only), now supports:

Snapshot Isolation Verification (SIV)

Build

$git clone https://github.com/xelabs/go-jepsen

$cd go-jepsen

$make build

$./bin/jepsen -h

Usage

$ ./bin/jepsen -h

A tool for distributed systems verification

Usage:

jepsen [command]

Available Commands:

prepare prepare jepsen tables and datas

cleanup cleanup jepsen tables and datas

snapshot Snapshot Isolation Verification (SIV)

Flags:

--max-request uint limit for total requests, including write and read(Default 0, means no limits)

--max-time int limit for total execution time in seconds(Default 3600) (default 3600)

--mysql-host string MySQL server host(Default NULL)

--mysql-password string MySQL password(Default jepsen) (default "jepsen")

--mysql-port int MySQL server port(Default 3306) (default 3306)

--mysql-table-engine string storage engine to use for the jepsen table {tokudb,innodb,...}(Default innodb) (default "innodb")

--mysql-user string MySQL user(Default jepsen) (default "jepsen")

--table-size int The total number of the jepsen table(Default 10000) (default 10000)

Examples

Prepare

./bin/jepsen --mysql-host=192.168.0.3 --mysql-user=jepsen --mysql-password=jepsen prepare

prepare.create.the.table.jepsen_si(engine=innodb) ...

prepare.the.datas[10000].for.table.jepsen_si...

Cleanup

./bin/jepsen --mysql-host=192.168.0.3 --mysql-user=jepsen --mysql-password=jepsen cleanup

Snapshot Isolation Verification

./bin/jepsen --mysql-host=192.168.0.3 --mysql-user=jepsen --mysql-password=jepsen --max-time=60 snapshot

... ...

time thds w-ops r-ops error(s) total-ops

[57s] [r:16,u:1] 20000 1010000 0 59640000

time thds w-ops r-ops error(s) total-ops

[58s] [r:16,u:1] 30000 1130000 0 60800000

time thds w-ops r-ops error(s) total-ops

[59s] [r:16,u:1] 30000 1140000 0 61970000

time thds w-ops r-ops error(s) total-ops

[60s] [r:16,u:1] 30000 890000 0 62890000

the columns:

time: verification uptime

thds: read threads and update threads, here we use 16-threads for table scan and 1-thread for updating the whole table

w-ops: the number of rows affected by an UPDATE query

r-ops: the number of rows affected by an SELECT query

errors: the number of verification failed

total-ops: the total number of verification

Notes:

If the column of error(s) is not zero, the distributed systems does not satisfy its claims of Snapshot Isolation, reads are inconsistent.

To find out more about Snapshot Isolation, please visit [Jepsen: MariaDB Galera Cluster](https://aphyr.com/posts/327-jepsen-mariadb-galera-cluster)

License

go-jepsen is released under the GPLv3. See LICENSE

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值