diff --git a/kv/txn.go b/kv/txn.go
index <HASH>..<HASH> 100644
--- a/kv/txn.go
+++ b/kv/txn.go
@@ -92,7 +92,7 @@ var (
 // See: http://www.awsarchitectureblog.com/2015/03/backoff.html.
 func BackOff(attempts int) int {
 	upper := int(math.Min(float64(retryBackOffCap), float64(retryBackOffBase)*math.Pow(2.0, float64(attempts))))
-	sleep := time.Duration(rand.Intn(upper)) * time.Microsecond
+	sleep := time.Duration(rand.Intn(upper)) * time.Millisecond
 	time.Sleep(sleep)
 	return int(sleep)
 }
diff --git a/kv/txn_test.go b/kv/txn_test.go
index <HASH>..<HASH> 100644
--- a/kv/txn_test.go
+++ b/kv/txn_test.go
@@ -14,6 +14,8 @@
 package kv
 
 import (
+	"time"
+
 	. "github.com/pingcap/check"
 )
 
@@ -36,5 +38,5 @@ func (s *testTxnSuite) TestBackOff(c *C) {
 }
 
 func mustBackOff(c *C, cnt, sleep int) {
-	c.Assert(BackOff(cnt), LessEqual, sleep*1000)
+	c.Assert(BackOff(cnt), LessEqual, sleep*int(time.Millisecond))
 }
kv: Change backoff time from Microseconds to Milliseconds