Skip to content

Commit

Permalink
*: Upgrade to pingcap/errors@v1.11.1 (pingcap#590)
Browse files Browse the repository at this point in the history
  • Loading branch information
suzaku authored May 8, 2019
1 parent 8970097 commit 2d8db5e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/montanaflynn/stats v0.0.0-20180911141734-db72e6cae808 // indirect
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8
github.com/pingcap/errors v0.11.0
github.com/pingcap/errors v0.11.1
github.com/pingcap/log v0.0.0-20190307075452-bd41d9273596
github.com/pingcap/parser v0.0.0-20190411060258-7e41749fa69c
github.com/pingcap/pd v2.1.3+incompatible
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8 h1:USx2/E1bX46VG32FI
github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8/go.mod h1:B1+S9LNcuMyLH/4HMTViQOJevkGiik3wW2AN9zb2fNQ=
github.com/pingcap/errors v0.11.0 h1:DCJQB8jrHbQ1VVlMFIrbj2ApScNNotVmkSNplu2yUt4=
github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pingcap/errors v0.11.1 h1:BXFZ6MdDd2U1uJUa2sRAWTmm+nieEzuyYM0R4aUTcC8=
github.com/pingcap/errors v0.11.1/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pingcap/gofail v0.0.0-20181217135706-6a951c1e42c3 h1:04yuCf5NMvLU8rB2m4Qs3rynH7EYpMno3lHkewIOdMo=
github.com/pingcap/gofail v0.0.0-20181217135706-6a951c1e42c3/go.mod h1:DazNTg0PTldtpsQiT9I5tVJwV1onHMKBBgXzmJUlMns=
github.com/pingcap/goleveldb v0.0.0-20171020084629-8d44bfdf1030 h1:XJLuW0lsP7vAtQ2iPjZwvXZ14m5urp9No+Qr06ZZcTo=
Expand Down
11 changes: 2 additions & 9 deletions pkg/loader/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,7 @@ func (e *executor) bulkDelete(deletes []*DML) error {
}

err = tx.commit()
if err != nil {
return errors.Trace(err)
}
return nil
return errors.Trace(err)
}

func (e *executor) bulkReplace(inserts []*DML) error {
Expand Down Expand Up @@ -177,11 +174,7 @@ func (e *executor) bulkReplace(inserts []*DML) error {
return errors.Trace(err)
}
err = tx.commit()
if err != nil {
return errors.Trace(err)
}
return nil

return errors.Trace(err)
}

// we merge dmls by primary key, after merge by key, we
Expand Down

0 comments on commit 2d8db5e

Please sign in to comment.