Skip to content

Commit

Permalink
build, backend: add backend commit failpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Romano committed Jul 14, 2016
1 parent 35d379b commit ba2725c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions mvcc/backend/batch_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit ba2725c

Please sign in to comment.