From ba2725c2d08543279b9df64b23b5db1209ddc90e Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Mon, 4 Jul 2016 00:26:30 -0700 Subject: [PATCH] build, backend: add backend commit failpoints --- build | 2 +- mvcc/backend/batch_tx.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build b/build index d644addce84..d390013519d 100755 --- a/build +++ b/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 diff --git a/mvcc/backend/batch_tx.go b/mvcc/backend/batch_tx.go index e1cdcc65a92..287f79083e8 100644 --- a/mvcc/backend/batch_tx.go +++ b/mvcc/backend/batch_tx.go @@ -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)