diff --git a/client/client.go b/client/client.go index 9f838fbb23d..24a7f5aa0be 100644 --- a/client/client.go +++ b/client/client.go @@ -20,10 +20,10 @@ import ( "time" "github.com/opentracing/opentracing-go" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/errs" "go.uber.org/zap" ) diff --git a/cmd/pd-server/main.go b/cmd/pd-server/main.go index b6d4b687c3f..50d7ace2b45 100644 --- a/cmd/pd-server/main.go +++ b/cmd/pd-server/main.go @@ -21,8 +21,8 @@ import ( "syscall" grpcprometheus "github.com/grpc-ecosystem/go-grpc-prometheus" + "github.com/pingcap/errors" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/dashboard" "github.com/tikv/pd/pkg/logutil" "github.com/tikv/pd/pkg/metricutil" diff --git a/go.mod b/go.mod index 6e2e3c6a7a6..05e0cb3e53b 100644 --- a/go.mod +++ b/go.mod @@ -33,8 +33,7 @@ require ( github.com/pingcap/failpoint v0.0.0-20191029060244-12f4ac2fd11d github.com/pingcap/kvproto v0.0.0-20200818080353-7aaed8998596 github.com/pingcap/log v0.0.0-20200511115504-543df19646ad - github.com/pingcap/sysutil v0.0.0-20200408114249-ed3bd6f7fdb1 - github.com/pkg/errors v0.9.1 + github.com/pingcap/sysutil v0.0.0-20200715082929-4c47bcac246a github.com/prometheus/client_golang v1.0.0 github.com/sasha-s/go-deadlock v0.2.0 github.com/sirupsen/logrus v1.2.0 diff --git a/go.sum b/go.sum index 2173d40c95a..e4e7b948a91 100644 --- a/go.sum +++ b/go.sum @@ -305,10 +305,9 @@ github.com/pingcap/log v0.0.0-20200117041106-d28c14d3b1cd/go.mod h1:4rbK1p9ILyIf github.com/pingcap/log v0.0.0-20200511115504-543df19646ad h1:SveG82rmu/GFxYanffxsSF503SiQV+2JLnWEiGiF+Tc= github.com/pingcap/log v0.0.0-20200511115504-543df19646ad/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= github.com/pingcap/sysutil v0.0.0-20200206130906-2bfa6dc40bcd/go.mod h1:EB/852NMQ+aRKioCpToQ94Wl7fktV+FNnxf3CX/TTXI= -github.com/pingcap/sysutil v0.0.0-20200408114249-ed3bd6f7fdb1 h1:PI8YpTl45F8ilNkrPtT4IdbcZB1SCEa+gK/U5GJYl3E= -github.com/pingcap/sysutil v0.0.0-20200408114249-ed3bd6f7fdb1/go.mod h1:EB/852NMQ+aRKioCpToQ94Wl7fktV+FNnxf3CX/TTXI= +github.com/pingcap/sysutil v0.0.0-20200715082929-4c47bcac246a h1:i2RElJ2aykSqZKeY+3SK18NHhajil8cQdG77wHe+P1Y= +github.com/pingcap/sysutil v0.0.0-20200715082929-4c47bcac246a/go.mod h1:EB/852NMQ+aRKioCpToQ94Wl7fktV+FNnxf3CX/TTXI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= diff --git a/pkg/apiutil/apiutil.go b/pkg/apiutil/apiutil.go index 88717cf4633..abf90095bcc 100644 --- a/pkg/apiutil/apiutil.go +++ b/pkg/apiutil/apiutil.go @@ -22,8 +22,8 @@ import ( "strconv" "github.com/pingcap/errcode" + "github.com/pingcap/errors" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/unrolled/render" ) diff --git a/pkg/codec/codec.go b/pkg/codec/codec.go index a220df0aa67..91a897fa9a9 100644 --- a/pkg/codec/codec.go +++ b/pkg/codec/codec.go @@ -17,7 +17,7 @@ import ( "bytes" "encoding/binary" - "github.com/pkg/errors" + "github.com/pingcap/errors" ) var ( diff --git a/pkg/etcdutil/etcdutil.go b/pkg/etcdutil/etcdutil.go index 6c7d9991c20..9a838f1dec1 100644 --- a/pkg/etcdutil/etcdutil.go +++ b/pkg/etcdutil/etcdutil.go @@ -20,8 +20,8 @@ import ( "time" "github.com/gogo/protobuf/proto" + "github.com/pingcap/errors" "github.com/pingcap/log" - "github.com/pkg/errors" "go.etcd.io/etcd/clientv3" "go.etcd.io/etcd/etcdserver" "go.etcd.io/etcd/pkg/types" diff --git a/pkg/grpcutil/grpcutil.go b/pkg/grpcutil/grpcutil.go index b0babe4c7d4..72b96bc0021 100644 --- a/pkg/grpcutil/grpcutil.go +++ b/pkg/grpcutil/grpcutil.go @@ -18,7 +18,7 @@ import ( "crypto/tls" "net/url" - "github.com/pkg/errors" + "github.com/pingcap/errors" "go.etcd.io/etcd/pkg/transport" "google.golang.org/grpc" "google.golang.org/grpc/credentials" diff --git a/pkg/logutil/log.go b/pkg/logutil/log.go index a03df769f7c..25e74a43ea5 100644 --- a/pkg/logutil/log.go +++ b/pkg/logutil/log.go @@ -23,8 +23,8 @@ import ( "sync" "github.com/coreos/pkg/capnslog" + "github.com/pingcap/errors" zaplog "github.com/pingcap/log" - "github.com/pkg/errors" log "github.com/sirupsen/logrus" "go.etcd.io/etcd/raft" "go.uber.org/zap" diff --git a/pkg/typeutil/convension.go b/pkg/typeutil/convension.go index 02cad9effaa..df869bbc9e4 100644 --- a/pkg/typeutil/convension.go +++ b/pkg/typeutil/convension.go @@ -16,7 +16,7 @@ package typeutil import ( "encoding/binary" - "github.com/pkg/errors" + "github.com/pingcap/errors" ) // BytesToUint64 converts a byte slice to uint64. diff --git a/pkg/typeutil/duration.go b/pkg/typeutil/duration.go index 6e3bfe9a496..15ed30af963 100644 --- a/pkg/typeutil/duration.go +++ b/pkg/typeutil/duration.go @@ -18,7 +18,7 @@ import ( "strconv" "time" - "github.com/pkg/errors" + "github.com/pingcap/errors" ) // Duration is a wrapper of time.Duration for TOML and JSON. diff --git a/pkg/typeutil/size.go b/pkg/typeutil/size.go index e80c5efd011..e3cc12bf3e4 100644 --- a/pkg/typeutil/size.go +++ b/pkg/typeutil/size.go @@ -17,7 +17,7 @@ import ( "strconv" "github.com/docker/go-units" - "github.com/pkg/errors" + "github.com/pingcap/errors" ) // ByteSize is a retype uint64 for TOML and JSON. diff --git a/pkg/typeutil/string_slice.go b/pkg/typeutil/string_slice.go index 3eb004b282b..7da4259db65 100644 --- a/pkg/typeutil/string_slice.go +++ b/pkg/typeutil/string_slice.go @@ -17,7 +17,7 @@ import ( "strconv" "strings" - "github.com/pkg/errors" + "github.com/pingcap/errors" ) // StringSlice is more friendly to json encode/decode diff --git a/plugin/scheduler_example/evict_leader.go b/plugin/scheduler_example/evict_leader.go index 98c0abcfa25..ae51b1a3ab6 100644 --- a/plugin/scheduler_example/evict_leader.go +++ b/plugin/scheduler_example/evict_leader.go @@ -20,8 +20,8 @@ import ( "sync" "github.com/gorilla/mux" + "github.com/pingcap/errors" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/apiutil" "github.com/tikv/pd/server/core" "github.com/tikv/pd/server/schedule" diff --git a/server/api/component.go b/server/api/component.go index 50d39714ce5..e0b56263e0c 100644 --- a/server/api/component.go +++ b/server/api/component.go @@ -18,7 +18,7 @@ import ( "github.com/gorilla/mux" "github.com/pingcap/errcode" - "github.com/pkg/errors" + "github.com/pingcap/errors" "github.com/tikv/pd/pkg/apiutil" "github.com/tikv/pd/server" "github.com/unrolled/render" diff --git a/server/api/config.go b/server/api/config.go index b0f8378b62f..9d31466de4b 100644 --- a/server/api/config.go +++ b/server/api/config.go @@ -23,8 +23,8 @@ import ( "strings" "github.com/pingcap/errcode" + "github.com/pingcap/errors" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/apiutil" "github.com/tikv/pd/pkg/logutil" "github.com/tikv/pd/server" diff --git a/server/api/diagnose.go b/server/api/diagnose.go index a5c7f80a2d4..fb16890d92b 100644 --- a/server/api/diagnose.go +++ b/server/api/diagnose.go @@ -19,8 +19,8 @@ import ( "net/http" "time" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/pdpb" - "github.com/pkg/errors" "github.com/tikv/pd/server" "github.com/unrolled/render" ) diff --git a/server/api/label.go b/server/api/label.go index 7d634e61a89..713559286b7 100644 --- a/server/api/label.go +++ b/server/api/label.go @@ -18,8 +18,8 @@ import ( "regexp" "strings" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" - "github.com/pkg/errors" "github.com/tikv/pd/server" "github.com/unrolled/render" ) diff --git a/server/api/member.go b/server/api/member.go index c3d0de09262..9f89aacb1e7 100644 --- a/server/api/member.go +++ b/server/api/member.go @@ -20,9 +20,9 @@ import ( "strconv" "github.com/gorilla/mux" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/apiutil" "github.com/tikv/pd/pkg/etcdutil" "github.com/tikv/pd/server" diff --git a/server/api/rule.go b/server/api/rule.go index a77a52239c4..e1b52b073a8 100644 --- a/server/api/rule.go +++ b/server/api/rule.go @@ -20,7 +20,7 @@ import ( "strconv" "github.com/gorilla/mux" - "github.com/pkg/errors" + "github.com/pingcap/errors" "github.com/tikv/pd/pkg/apiutil" "github.com/tikv/pd/pkg/codec" "github.com/tikv/pd/pkg/keyutil" diff --git a/server/api/store.go b/server/api/store.go index 92e0cc6950b..002c248b684 100644 --- a/server/api/store.go +++ b/server/api/store.go @@ -21,8 +21,8 @@ import ( "github.com/gorilla/mux" "github.com/pingcap/errcode" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/apiutil" "github.com/tikv/pd/pkg/typeutil" "github.com/tikv/pd/server" diff --git a/server/api/util.go b/server/api/util.go index 169cf84efbe..f7e26524d43 100644 --- a/server/api/util.go +++ b/server/api/util.go @@ -20,7 +20,7 @@ import ( "net/http" "net/url" - "github.com/pkg/errors" + "github.com/pingcap/errors" ) var ( diff --git a/server/cluster/cluster.go b/server/cluster/cluster.go index 885767aabb2..1048467857b 100644 --- a/server/cluster/cluster.go +++ b/server/cluster/cluster.go @@ -23,12 +23,12 @@ import ( "github.com/coreos/go-semver/semver" "github.com/gogo/protobuf/proto" "github.com/pingcap/errcode" + "github.com/pingcap/errors" "github.com/pingcap/failpoint" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/kvproto/pkg/replication_modepb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/cache" "github.com/tikv/pd/pkg/component" "github.com/tikv/pd/pkg/etcdutil" diff --git a/server/cluster/cluster_worker.go b/server/cluster/cluster_worker.go index b106004ac1b..b7a03d5275c 100644 --- a/server/cluster/cluster_worker.go +++ b/server/cluster/cluster_worker.go @@ -17,10 +17,10 @@ import ( "bytes" "github.com/gogo/protobuf/proto" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/errs" "github.com/tikv/pd/server/core" "github.com/tikv/pd/server/schedule" diff --git a/server/cluster/version.go b/server/cluster/version.go index 62421587b31..a48e9805d7c 100644 --- a/server/cluster/version.go +++ b/server/cluster/version.go @@ -15,8 +15,8 @@ package cluster import ( "github.com/coreos/go-semver/semver" + "github.com/pingcap/errors" "github.com/pingcap/log" - "github.com/pkg/errors" "go.uber.org/zap" ) diff --git a/server/config/config.go b/server/config/config.go index f87fa5fdbae..331e5676ef1 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -35,9 +35,9 @@ import ( "github.com/BurntSushi/toml" "github.com/coreos/go-semver/semver" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/log" - "github.com/pkg/errors" "go.etcd.io/etcd/embed" "go.etcd.io/etcd/pkg/transport" "go.uber.org/zap" diff --git a/server/config/util.go b/server/config/util.go index aae4f20d46f..6b3c43a8449 100644 --- a/server/config/util.go +++ b/server/config/util.go @@ -17,8 +17,8 @@ import ( "net/url" "regexp" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" - "github.com/pkg/errors" ) const ( diff --git a/server/core/errors.go b/server/core/errors.go index 0ba5b0677d0..bb96508184f 100644 --- a/server/core/errors.go +++ b/server/core/errors.go @@ -21,8 +21,8 @@ import ( "net/http" "github.com/pingcap/errcode" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" - "github.com/pkg/errors" ) var ( diff --git a/server/core/region_storage.go b/server/core/region_storage.go index a059c671e7b..516eb0b8460 100644 --- a/server/core/region_storage.go +++ b/server/core/region_storage.go @@ -19,9 +19,9 @@ import ( "sync" "time" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/server/kv" "go.uber.org/zap" ) diff --git a/server/core/storage.go b/server/core/storage.go index b1f006816dd..5fbc170ac8c 100644 --- a/server/core/storage.go +++ b/server/core/storage.go @@ -25,8 +25,8 @@ import ( "time" "github.com/gogo/protobuf/proto" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" - "github.com/pkg/errors" "github.com/tikv/pd/server/kv" "go.etcd.io/etcd/clientv3" ) diff --git a/server/core/storage_test.go b/server/core/storage_test.go index 7fce5da869e..d0454475a95 100644 --- a/server/core/storage_test.go +++ b/server/core/storage_test.go @@ -22,8 +22,8 @@ import ( "time" . "github.com/pingcap/check" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" - "github.com/pkg/errors" "github.com/tikv/pd/server/kv" ) diff --git a/server/grpc_service.go b/server/grpc_service.go index 036f92a5116..78c178ed1a0 100644 --- a/server/grpc_service.go +++ b/server/grpc_service.go @@ -21,11 +21,11 @@ import ( "sync/atomic" "time" + "github.com/pingcap/errors" "github.com/pingcap/failpoint" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/server/cluster" "github.com/tikv/pd/server/core" "go.uber.org/zap" diff --git a/server/handler.go b/server/handler.go index 94f3d4a804f..210fa10490d 100644 --- a/server/handler.go +++ b/server/handler.go @@ -24,10 +24,10 @@ import ( "time" "github.com/pingcap/errcode" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/server/cluster" "github.com/tikv/pd/server/config" "github.com/tikv/pd/server/core" diff --git a/server/id/id.go b/server/id/id.go index c004de7f923..35b9aa19455 100644 --- a/server/id/id.go +++ b/server/id/id.go @@ -17,8 +17,8 @@ import ( "path" "sync" + "github.com/pingcap/errors" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/etcdutil" "github.com/tikv/pd/pkg/typeutil" "github.com/tikv/pd/server/kv" diff --git a/server/join/join.go b/server/join/join.go index b816287ea50..b34d73c19a6 100644 --- a/server/join/join.go +++ b/server/join/join.go @@ -21,9 +21,9 @@ import ( "strings" "time" + "github.com/pingcap/errors" "github.com/pingcap/failpoint" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/etcdutil" "github.com/tikv/pd/server/config" "go.etcd.io/etcd/clientv3" diff --git a/server/kv/etcd_kv.go b/server/kv/etcd_kv.go index bc0015987c2..08de0179ffb 100644 --- a/server/kv/etcd_kv.go +++ b/server/kv/etcd_kv.go @@ -19,8 +19,8 @@ import ( "strings" "time" + "github.com/pingcap/errors" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/errs" "github.com/tikv/pd/pkg/etcdutil" "go.etcd.io/etcd/clientv3" diff --git a/server/kv/levedb_kv.go b/server/kv/levedb_kv.go index df707032472..034253dcac3 100644 --- a/server/kv/levedb_kv.go +++ b/server/kv/levedb_kv.go @@ -15,8 +15,8 @@ package kv import ( "github.com/gogo/protobuf/proto" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" - "github.com/pkg/errors" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/util" ) diff --git a/server/member/leader.go b/server/member/leader.go index f86f5c58164..b740e9898ac 100644 --- a/server/member/leader.go +++ b/server/member/leader.go @@ -25,10 +25,10 @@ import ( "sync/atomic" "time" + "github.com/pingcap/errors" "github.com/pingcap/failpoint" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/errs" "github.com/tikv/pd/pkg/etcdutil" "github.com/tikv/pd/server/config" diff --git a/server/member/lease.go b/server/member/lease.go index 183c6a0c3b1..2c00d7e490c 100644 --- a/server/member/lease.go +++ b/server/member/lease.go @@ -18,8 +18,8 @@ import ( "sync/atomic" "time" + "github.com/pingcap/errors" "github.com/pingcap/log" - "github.com/pkg/errors" "go.etcd.io/etcd/clientv3" "go.uber.org/zap" ) diff --git a/server/region_syncer/client.go b/server/region_syncer/client.go index 44ec04d72a4..74fff7c4ea4 100644 --- a/server/region_syncer/client.go +++ b/server/region_syncer/client.go @@ -17,10 +17,10 @@ import ( "context" "time" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/grpcutil" "github.com/tikv/pd/server/core" "go.uber.org/zap" diff --git a/server/region_syncer/server.go b/server/region_syncer/server.go index a5fe7cf055c..8c464e97d6d 100644 --- a/server/region_syncer/server.go +++ b/server/region_syncer/server.go @@ -20,10 +20,10 @@ import ( "time" "github.com/juju/ratelimit" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/grpcutil" "github.com/tikv/pd/server/core" "go.uber.org/zap" diff --git a/server/schedule/checker/rule_checker.go b/server/schedule/checker/rule_checker.go index 2f8d22cae8e..38aa5ad22bf 100644 --- a/server/schedule/checker/rule_checker.go +++ b/server/schedule/checker/rule_checker.go @@ -14,10 +14,10 @@ package checker import ( + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/server/core" "github.com/tikv/pd/server/schedule/filter" "github.com/tikv/pd/server/schedule/operator" diff --git a/server/schedule/operator/builder.go b/server/schedule/operator/builder.go index 8f9feec1afc..540628be39f 100644 --- a/server/schedule/operator/builder.go +++ b/server/schedule/operator/builder.go @@ -17,8 +17,8 @@ import ( "fmt" "sort" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" - "github.com/pkg/errors" "github.com/tikv/pd/server/core" "github.com/tikv/pd/server/schedule/filter" "github.com/tikv/pd/server/schedule/placement" diff --git a/server/schedule/operator/kind.go b/server/schedule/operator/kind.go index a222437ed52..85181552332 100644 --- a/server/schedule/operator/kind.go +++ b/server/schedule/operator/kind.go @@ -16,7 +16,7 @@ package operator import ( "strings" - "github.com/pkg/errors" + "github.com/pingcap/errors" ) // OpKind is a bit field to identify operator types. diff --git a/server/schedule/operator/step.go b/server/schedule/operator/step.go index a114ebf1d8d..f2c6566bfdd 100644 --- a/server/schedule/operator/step.go +++ b/server/schedule/operator/step.go @@ -17,10 +17,10 @@ import ( "bytes" "fmt" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/server/core" "github.com/tikv/pd/server/schedule/storelimit" "go.uber.org/zap" diff --git a/server/schedule/placement/rule_list.go b/server/schedule/placement/rule_list.go index 64926a79d19..7dcd41be1bc 100644 --- a/server/schedule/placement/rule_list.go +++ b/server/schedule/placement/rule_list.go @@ -19,7 +19,7 @@ import ( "sort" "strings" - "github.com/pkg/errors" + "github.com/pingcap/errors" ) type splitPointType int diff --git a/server/schedule/placement/rule_manager.go b/server/schedule/placement/rule_manager.go index 0361c494ee9..8be530cb23c 100644 --- a/server/schedule/placement/rule_manager.go +++ b/server/schedule/placement/rule_manager.go @@ -19,8 +19,8 @@ import ( "encoding/json" "sync" + "github.com/pingcap/errors" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/server/core" "go.uber.org/zap" ) diff --git a/server/schedule/region_scatterer.go b/server/schedule/region_scatterer.go index 52817aabf2a..c6ca4f253ef 100644 --- a/server/schedule/region_scatterer.go +++ b/server/schedule/region_scatterer.go @@ -18,9 +18,9 @@ import ( "math/rand" "sync" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/server/core" "github.com/tikv/pd/server/schedule/filter" "github.com/tikv/pd/server/schedule/operator" diff --git a/server/schedule/scheduler.go b/server/schedule/scheduler.go index ad1c2fdbfc0..30b3aca6034 100644 --- a/server/schedule/scheduler.go +++ b/server/schedule/scheduler.go @@ -19,8 +19,8 @@ import ( "strings" "time" + "github.com/pingcap/errors" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/server/core" "github.com/tikv/pd/server/schedule/operator" "github.com/tikv/pd/server/schedule/opt" diff --git a/server/schedulers/scatter_range.go b/server/schedulers/scatter_range.go index 2b3ba6e6bc0..cd49c4ed164 100644 --- a/server/schedulers/scatter_range.go +++ b/server/schedulers/scatter_range.go @@ -19,7 +19,7 @@ import ( "sync" "github.com/gorilla/mux" - "github.com/pkg/errors" + "github.com/pingcap/errors" "github.com/tikv/pd/pkg/apiutil" "github.com/tikv/pd/pkg/errs" "github.com/tikv/pd/server/core" diff --git a/server/server.go b/server/server.go index d12bc5c20d5..f4689d01ea7 100644 --- a/server/server.go +++ b/server/server.go @@ -31,13 +31,13 @@ import ( "github.com/coreos/go-semver/semver" "github.com/golang/protobuf/proto" "github.com/gorilla/mux" + "github.com/pingcap/errors" "github.com/pingcap/failpoint" "github.com/pingcap/kvproto/pkg/diagnosticspb" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/log" "github.com/pingcap/sysutil" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/etcdutil" "github.com/tikv/pd/pkg/grpcutil" "github.com/tikv/pd/pkg/logutil" diff --git a/server/tso/tso.go b/server/tso/tso.go index bc3a5f82fbf..3122b02a015 100644 --- a/server/tso/tso.go +++ b/server/tso/tso.go @@ -20,10 +20,10 @@ import ( "time" "unsafe" + "github.com/pingcap/errors" "github.com/pingcap/failpoint" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/etcdutil" "github.com/tikv/pd/pkg/tsoutil" "github.com/tikv/pd/pkg/typeutil" diff --git a/server/util.go b/server/util.go index 087ce3c4326..8af33e42285 100644 --- a/server/util.go +++ b/server/util.go @@ -20,9 +20,9 @@ import ( "path" "time" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/etcdutil" "github.com/tikv/pd/pkg/typeutil" "github.com/tikv/pd/server/cluster" diff --git a/tests/cluster.go b/tests/cluster.go index eed839ec822..dd1f707a84e 100644 --- a/tests/cluster.go +++ b/tests/cluster.go @@ -21,10 +21,10 @@ import ( "time" "github.com/coreos/go-semver/semver" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/log" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/dashboard" "github.com/tikv/pd/pkg/swaggerserver" "github.com/tikv/pd/server" diff --git a/tests/server/cluster/cluster_test.go b/tests/server/cluster/cluster_test.go index 36adee9a1c9..8f5e15e8619 100644 --- a/tests/server/cluster/cluster_test.go +++ b/tests/server/cluster/cluster_test.go @@ -22,11 +22,11 @@ import ( "github.com/coreos/go-semver/semver" . "github.com/pingcap/check" + "github.com/pingcap/errors" "github.com/pingcap/failpoint" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/kvproto/pkg/pdpb" "github.com/pingcap/kvproto/pkg/replication_modepb" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/dashboard" "github.com/tikv/pd/pkg/mock/mockid" "github.com/tikv/pd/pkg/testutil" diff --git a/tests/server/member/member_test.go b/tests/server/member/member_test.go index 817cad9d9f4..2e5462ee9ae 100644 --- a/tests/server/member/member_test.go +++ b/tests/server/member/member_test.go @@ -25,8 +25,8 @@ import ( "time" . "github.com/pingcap/check" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/pdpb" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/testutil" "github.com/tikv/pd/server" "github.com/tikv/pd/server/config" diff --git a/tools/pd-ctl/pdctl/command/global.go b/tools/pd-ctl/pdctl/command/global.go index 2748cd93fab..6ee612697d4 100644 --- a/tools/pd-ctl/pdctl/command/global.go +++ b/tools/pd-ctl/pdctl/command/global.go @@ -23,7 +23,7 @@ import ( "os" "strings" - "github.com/pkg/errors" + "github.com/pingcap/errors" "github.com/spf13/cobra" "go.etcd.io/etcd/pkg/transport" ) diff --git a/tools/pd-ctl/pdctl/command/operator.go b/tools/pd-ctl/pdctl/command/operator.go index 19212b19570..84b6c8453b8 100644 --- a/tools/pd-ctl/pdctl/command/operator.go +++ b/tools/pd-ctl/pdctl/command/operator.go @@ -18,7 +18,7 @@ import ( "net/http" "strconv" - "github.com/pkg/errors" + "github.com/pingcap/errors" "github.com/spf13/cobra" ) diff --git a/tools/pd-ctl/pdctl/command/region_command.go b/tools/pd-ctl/pdctl/command/region_command.go index 4f241ae0279..a2f9062dac7 100644 --- a/tools/pd-ctl/pdctl/command/region_command.go +++ b/tools/pd-ctl/pdctl/command/region_command.go @@ -25,7 +25,7 @@ import ( "strconv" "strings" - "github.com/pkg/errors" + "github.com/pingcap/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" ) diff --git a/tools/pd-simulator/simulator/client.go b/tools/pd-simulator/simulator/client.go index 9f6933704aa..39fc3f4746d 100644 --- a/tools/pd-simulator/simulator/client.go +++ b/tools/pd-simulator/simulator/client.go @@ -19,13 +19,12 @@ import ( "sync" "time" - "go.uber.org/zap" - + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" "github.com/pingcap/kvproto/pkg/pdpb" - "github.com/pkg/errors" "github.com/tikv/pd/server/core" "github.com/tikv/pd/tools/pd-simulator/simulator/simutil" + "go.uber.org/zap" "google.golang.org/grpc" ) diff --git a/tools/pd-simulator/simulator/drive.go b/tools/pd-simulator/simulator/drive.go index 1aa7cc4ee4f..269dc1eb83f 100644 --- a/tools/pd-simulator/simulator/drive.go +++ b/tools/pd-simulator/simulator/drive.go @@ -17,14 +17,13 @@ import ( "context" "sync" - "go.uber.org/zap" - + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" - "github.com/pkg/errors" "github.com/tikv/pd/server/core" "github.com/tikv/pd/tools/pd-simulator/simulator/cases" "github.com/tikv/pd/tools/pd-simulator/simulator/info" "github.com/tikv/pd/tools/pd-simulator/simulator/simutil" + "go.uber.org/zap" ) // Driver promotes the cluster status change. diff --git a/tools/pd-simulator/simulator/raft.go b/tools/pd-simulator/simulator/raft.go index d6102295012..9c97ba21a01 100644 --- a/tools/pd-simulator/simulator/raft.go +++ b/tools/pd-simulator/simulator/raft.go @@ -17,8 +17,8 @@ import ( "context" "sync" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" - "github.com/pkg/errors" "github.com/tikv/pd/server/core" "github.com/tikv/pd/tools/pd-simulator/simulator/cases" "github.com/tikv/pd/tools/pd-simulator/simulator/simutil" diff --git a/tools/pd-simulator/simulator/simutil/key.go b/tools/pd-simulator/simulator/simutil/key.go index 1d03dcf6b77..d25c95230af 100644 --- a/tools/pd-simulator/simulator/simutil/key.go +++ b/tools/pd-simulator/simulator/simutil/key.go @@ -18,7 +18,7 @@ import ( "math/rand" "sort" - "github.com/pkg/errors" + "github.com/pingcap/errors" "github.com/tikv/pd/pkg/codec" ) diff --git a/tools/pd-tso-bench/main.go b/tools/pd-tso-bench/main.go index 576df81563c..6c82929bf58 100644 --- a/tools/pd-tso-bench/main.go +++ b/tools/pd-tso-bench/main.go @@ -23,8 +23,8 @@ import ( "syscall" "time" + "github.com/pingcap/errors" "github.com/pingcap/log" - "github.com/pkg/errors" pd "github.com/tikv/pd/client" "go.uber.org/zap" ) diff --git a/tools/regions-dump/main.go b/tools/regions-dump/main.go index 968d5d30090..48ed65e9dc8 100644 --- a/tools/regions-dump/main.go +++ b/tools/regions-dump/main.go @@ -11,8 +11,8 @@ import ( "strings" "time" + "github.com/pingcap/errors" "github.com/pingcap/kvproto/pkg/metapb" - "github.com/pkg/errors" "github.com/tikv/pd/pkg/etcdutil" "github.com/tikv/pd/server/core" "go.etcd.io/etcd/clientv3"