build, backend: add backend commit failpoints
parent
35d379b052
commit
ba2725c2d0
2
build
2
build
|
@ -12,7 +12,7 @@ fi
|
||||||
|
|
||||||
# enable/disable failpoints
|
# enable/disable failpoints
|
||||||
toggle_failpoints() {
|
toggle_failpoints() {
|
||||||
FAILPKGS="etcdserver/"
|
FAILPKGS="etcdserver/ mvcc/backend/"
|
||||||
|
|
||||||
mode="disable"
|
mode="disable"
|
||||||
if [ ! -z "$FAILPOINTS" ]; then mode="enable"; fi
|
if [ ! -z "$FAILPOINTS" ]; then mode="enable"; fi
|
||||||
|
|
|
@ -166,7 +166,9 @@ func (t *batchTx) commit(stop bool) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
|
// gofail: var beforeCommit struct{}
|
||||||
err = t.tx.Commit()
|
err = t.tx.Commit()
|
||||||
|
// gofail: var afterCommit struct{}
|
||||||
commitDurations.Observe(time.Since(start).Seconds())
|
commitDurations.Observe(time.Since(start).Seconds())
|
||||||
atomic.AddInt64(&t.backend.commits, 1)
|
atomic.AddInt64(&t.backend.commits, 1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue