mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #5944 from heyitsanthony/mvcc-failpoints
build, backend: add backend commit failpoints
This commit is contained in:
commit
575682f593
2
build
2
build
@ -12,7 +12,7 @@ fi
|
||||
|
||||
# enable/disable failpoints
|
||||
toggle_failpoints() {
|
||||
FAILPKGS="etcdserver/"
|
||||
FAILPKGS="etcdserver/ mvcc/backend/"
|
||||
|
||||
mode="disable"
|
||||
if [ ! -z "$FAILPOINTS" ]; then mode="enable"; fi
|
||||
|
@ -166,7 +166,9 @@ func (t *batchTx) commit(stop bool) {
|
||||
return
|
||||
}
|
||||
start := time.Now()
|
||||
// gofail: var beforeCommit struct{}
|
||||
err = t.tx.Commit()
|
||||
// gofail: var afterCommit struct{}
|
||||
commitDurations.Observe(time.Since(start).Seconds())
|
||||
atomic.AddInt64(&t.backend.commits, 1)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user