Repository: pingcap/pd
Pull request #2118 (2020-02-11 09:47:59)

mod: fix mod using Semantic Import Versioning for release 3.1
Signed-off-by: Shafreeck Sea <shafreeck@gmail.com

Update the module name according to the rules of Semantic Import Versioning. It will take effect on the next release, after that, users can get the latest v3.1+ version using `go get`

<!--
Thank you for working on PD! Please read PD's [CONTRIBUTING](https://github.com/pingcap/pd/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.
-->

### What problem does this PR solve? <!--add the issue link with summary if it exists-->
Fix the module name to make `go get pkg@v3.x.x` work

### What is changed and how it works?

* Rename `github.com/pingcap/pd` to `github.com/pingcap/pd/v3`
* Update `Makefile` to use the new package name.

### Check List <!--REMOVE the items that are not applicable-->

Tests <!-- At least one of them must be included. -->

 - Manual test (add detailed scripts or steps below)


shafreeck: /run-all-tests
shafreeck: /run-all-tests
shafreeck: /run-all-tests
codecov-io: # [Codecov](https://codecov.io/gh/pingcap/pd/pull/2118?src=pr&el=h1) Report
> Merging [#2118](https://codecov.io/gh/pingcap/pd/pull/2118?src=pr&el=desc) into [release-3.1](https://codecov.io/gh/pingcap/pd/commit/c0bcd8c0f89ab8329e3784f038f76d0a15101441?src=pr&el=desc) will **decrease** coverage by `0.07%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pingcap/pd/pull/2118/graphs/tree.svg?width=650&token=J1yRL471OI&height=150&src=pr)](https://codecov.io/gh/pingcap/pd/pull/2118?src=pr&el=tree)

```diff
@@               Coverage Diff               @@
##           release-3.1    #2118      +/-   ##
===============================================
- Coverage        74.99%   74.91%   -0.08%     
===============================================
  Files              194      194              
  Lines            19982    19982              
===============================================
- Hits             14985    14970      -15     
- Misses            3871     3876       +5     
- Partials          1126     1136      +10
```


| [Impacted Files](https://codecov.io/gh/pingcap/pd/pull/2118?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [server/id/id.go](https://codecov.io/gh/pingcap/pd/pull/2118/diff?src=pr&el=tree#diff-c2VydmVyL2lkL2lkLmdv) | `77.27% <ø> (ø)` | :arrow_up: |
| [server/config\_manager/config\_manager.go](https://codecov.io/gh/pingcap/pd/pull/2118/diff?src=pr&el=tree#diff-c2VydmVyL2NvbmZpZ19tYW5hZ2VyL2NvbmZpZ19tYW5hZ2VyLmdv) | `62.85% <ø> (ø)` | :arrow_up: |
| [server/statistics/region.go](https://codecov.io/gh/pingcap/pd/pull/2118/diff?src=pr&el=tree#diff-c2VydmVyL3N0YXRpc3RpY3MvcmVnaW9uLmdv) | `100% <ø> (ø)` | :arrow_up: |
| [server/core/region\_tree.go](https://codecov.io/gh/pingcap/pd/pull/2118/diff?src=pr&el=tree#diff-c2VydmVyL2NvcmUvcmVnaW9uX3RyZWUuZ28=) | `93.27% <ø> (ø)` | :arrow_up: |
| [server/api/member.go](https://codecov.io/gh/pingcap/pd/pull/2118/diff?src=pr&el=tree#diff-c2VydmVyL2FwaS9tZW1iZXIuZ28=) | `61.6% <ø> (ø)` | :arrow_up: |
| [server/schedule/placement/rule\_manager.go](https://codecov.io/gh/pingcap/pd/pull/2118/diff?src=pr&el=tree#diff-c2VydmVyL3NjaGVkdWxlL3BsYWNlbWVudC9ydWxlX21hbmFnZXIuZ28=) | `86.45% <ø> (ø)` | :arrow_up: |
| [tests/config.go](https://codecov.io/gh/pingcap/pd/pull/2118/diff?src=pr&el=tree#diff-dGVzdHMvY29uZmlnLmdv) | `95.91% <ø> (ø)` | :arrow_up: |
| [server/schedulers/shuffle\_region.go](https://codecov.io/gh/pingcap/pd/pull/2118/diff?src=pr&el=tree#diff-c2VydmVyL3NjaGVkdWxlcnMvc2h1ZmZsZV9yZWdpb24uZ28=) | `84.28% <ø> (ø)` | :arrow_up: |
| [server/statistics/store.go](https://codecov.io/gh/pingcap/pd/pull/2118/diff?src=pr&el=tree#diff-c2VydmVyL3N0YXRpc3RpY3Mvc3RvcmUuZ28=) | `70.87% <ø> (ø)` | :arrow_up: |
| [server/api/health.go](https://codecov.io/gh/pingcap/pd/pull/2118/diff?src=pr&el=tree#diff-c2VydmVyL2FwaS9oZWFsdGguZ28=) | `86.36% <ø> (ø)` | :arrow_up: |
| ... and [118 more](https://codecov.io/gh/pingcap/pd/pull/2118/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pingcap/pd/pull/2118?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pingcap/pd/pull/2118?src=pr&el=footer). Last update [c0bcd8c...298a2f9](https://codecov.io/gh/pingcap/pd/pull/2118?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

shafreeck: /run-all-tests

Patch:
diff --git a/Makefile b/Makefile
index 8c27e3672..336ac4d28 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,13 @@
-PD_PKG := github.com/pingcap/pd
+PD_PKG := github.com/pingcap/pd/v3
 
 TEST_PKGS := $(shell find . -iname "*_test.go" -exec dirname {} \; | \
-                     sort -u | sed -e "s/^\./github.com\/pingcap\/pd/")
+                     sort -u | sed -e "s/^\./github.com\/pingcap\/pd\/v3/")
 INTEGRATION_TEST_PKGS := $(shell find . -iname "*_test.go" -exec dirname {} \; | \
-                     sort -u | sed -e "s/^\./github.com\/pingcap\/pd/" | grep -E "tests")
+                     sort -u | sed -e "s/^\./github.com\/pingcap\/pd\/v3/" | grep -E "tests")
 BASIC_TEST_PKGS := $(filter-out $(INTEGRATION_TEST_PKGS),$(TEST_PKGS))
 
 PACKAGES := go list ./... | grep -v 'dashboard/uiserver'
-PACKAGE_DIRECTORIES := $(PACKAGES) | sed 's|github.com/pingcap/pd/||'
+PACKAGE_DIRECTORIES := $(PACKAGES) | sed 's|$(PD_PKG)/||'
 GOCHECKER := awk '{ print } END { if (NR > 0) { exit 1 } }'
 RETOOL := ./scripts/retool
 OVERALLS := overalls
diff --git a/client/base_client.go b/client/base_client.go
index 308b00f9f..743152a60 100644
--- a/client/base_client.go
+++ b/client/base_client.go
@@ -22,7 +22,7 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/grpcutil"
+	"github.com/pingcap/pd/v3/pkg/grpcutil"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 	"google.golang.org/grpc"
diff --git a/cmd/pd-server/main.go b/cmd/pd-server/main.go
index 28da5ed12..70444f679 100644
--- a/cmd/pd-server/main.go
+++ b/cmd/pd-server/main.go
@@ -22,19 +22,19 @@ import (
 
 	grpcprometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
 	"github.com/pingcap/log"
-	dashboardapi "github.com/pingcap/pd/pkg/dashboard/apiserver"
-	dashboardui "github.com/pingcap/pd/pkg/dashboard/uiserver"
-	"github.com/pingcap/pd/pkg/logutil"
-	"github.com/pingcap/pd/pkg/metricutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/api"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/join"
+	dashboardapi "github.com/pingcap/pd/v3/pkg/dashboard/apiserver"
+	dashboardui "github.com/pingcap/pd/v3/pkg/dashboard/uiserver"
+	"github.com/pingcap/pd/v3/pkg/logutil"
+	"github.com/pingcap/pd/v3/pkg/metricutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/api"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/join"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 
 	// Register schedulers.
-	_ "github.com/pingcap/pd/server/schedulers"
+	_ "github.com/pingcap/pd/v3/server/schedulers"
 )
 
 func main() {
diff --git a/go.mod b/go.mod
index b9754b95e..9a8376999 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/pingcap/pd
+module github.com/pingcap/pd/v3
 
 go 1.13
 
diff --git a/pkg/apiutil/serverapi/middleware.go b/pkg/apiutil/serverapi/middleware.go
index c1c10cfba..b2e04b4bd 100644
--- a/pkg/apiutil/serverapi/middleware.go
+++ b/pkg/apiutil/serverapi/middleware.go
@@ -22,8 +22,8 @@ import (
 	"sync"
 
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
 	"github.com/urfave/negroni"
 	"go.uber.org/zap"
 )
diff --git a/pkg/dashboard/apiserver/apiserver.go b/pkg/dashboard/apiserver/apiserver.go
index 27b6a559b..0cab4a826 100644
--- a/pkg/dashboard/apiserver/apiserver.go
+++ b/pkg/dashboard/apiserver/apiserver.go
@@ -24,8 +24,8 @@ import (
 	"github.com/pingcap-incubator/tidb-dashboard/pkg/keyvisual"
 	"github.com/pingcap-incubator/tidb-dashboard/pkg/keyvisual/region"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/dashboard/keyvisual/input"
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/pkg/dashboard/keyvisual/input"
+	"github.com/pingcap/pd/v3/server"
 	"go.uber.org/zap"
 )
 
diff --git a/pkg/dashboard/keyvisual/input/core.go b/pkg/dashboard/keyvisual/input/core.go
index 3faf43c51..ece7d3019 100644
--- a/pkg/dashboard/keyvisual/input/core.go
+++ b/pkg/dashboard/keyvisual/input/core.go
@@ -16,9 +16,9 @@ package input
 import (
 	regionpkg "github.com/pingcap-incubator/tidb-dashboard/pkg/keyvisual/region"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/server/core"
 	"go.uber.org/zap"
 )
 
diff --git a/pkg/dashboard/uiserver/uiserver.go b/pkg/dashboard/uiserver/uiserver.go
index 56a9f1677..9f50382f0 100644
--- a/pkg/dashboard/uiserver/uiserver.go
+++ b/pkg/dashboard/uiserver/uiserver.go
@@ -19,7 +19,7 @@ import (
 	"net/http"
 
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/server"
 	"go.uber.org/zap"
 )
 
diff --git a/pkg/metricutil/metricutil.go b/pkg/metricutil/metricutil.go
index d979cea09..230ac4089 100644
--- a/pkg/metricutil/metricutil.go
+++ b/pkg/metricutil/metricutil.go
@@ -19,7 +19,7 @@ import (
 	"unicode"
 
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/typeutil"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
 	"github.com/prometheus/client_golang/prometheus"
 	"github.com/prometheus/client_golang/prometheus/push"
 	"go.uber.org/zap"
diff --git a/pkg/mock/mockcluster/mockcluster.go b/pkg/mock/mockcluster/mockcluster.go
index 8814be963..c302bccb5 100644
--- a/pkg/mock/mockcluster/mockcluster.go
+++ b/pkg/mock/mockcluster/mockcluster.go
@@ -21,12 +21,12 @@ import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/mock/mockid"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/kv"
-	"github.com/pingcap/pd/server/schedule/placement"
-	"github.com/pingcap/pd/server/statistics"
+	"github.com/pingcap/pd/v3/pkg/mock/mockid"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/kv"
+	"github.com/pingcap/pd/v3/server/schedule/placement"
+	"github.com/pingcap/pd/v3/server/statistics"
 	"go.uber.org/zap"
 )
 
diff --git a/pkg/mock/mockhbstream/mockhbstream.go b/pkg/mock/mockhbstream/mockhbstream.go
index 864c0d606..6aee2f572 100644
--- a/pkg/mock/mockhbstream/mockhbstream.go
+++ b/pkg/mock/mockhbstream/mockhbstream.go
@@ -20,8 +20,8 @@ import (
 	"time"
 
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 )
 
 // HeartbeatStream is used to mock HeartbeatStream for test use.
diff --git a/pkg/mock/mockoption/mockoption.go b/pkg/mock/mockoption/mockoption.go
index 97fdb8366..2046c6009 100644
--- a/pkg/mock/mockoption/mockoption.go
+++ b/pkg/mock/mockoption/mockoption.go
@@ -17,7 +17,7 @@ import (
 	"time"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 const (
diff --git a/plugin/scheduler_example/evict_leader.go b/plugin/scheduler_example/evict_leader.go
index 6f0731b74..b5c67f898 100644
--- a/plugin/scheduler_example/evict_leader.go
+++ b/plugin/scheduler_example/evict_leader.go
@@ -21,14 +21,14 @@ import (
 
 	"github.com/gorilla/mux"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/apiutil"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/selector"
-	"github.com/pingcap/pd/server/schedulers"
+	"github.com/pingcap/pd/v3/pkg/apiutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/selector"
+	"github.com/pingcap/pd/v3/server/schedulers"
 	"github.com/pkg/errors"
 	"github.com/unrolled/render"
 	"go.uber.org/zap"
diff --git a/server/api/admin.go b/server/api/admin.go
index 1ca98bfe7..705ae7851 100644
--- a/server/api/admin.go
+++ b/server/api/admin.go
@@ -18,8 +18,8 @@ import (
 	"strconv"
 
 	"github.com/gorilla/mux"
-	"github.com/pingcap/pd/pkg/apiutil"
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/pkg/apiutil"
+	"github.com/pingcap/pd/v3/server"
 	"github.com/unrolled/render"
 )
 
diff --git a/server/api/cluster.go b/server/api/cluster.go
index eb6497532..7157fc272 100644
--- a/server/api/cluster.go
+++ b/server/api/cluster.go
@@ -16,7 +16,7 @@ package api
 import (
 	"net/http"
 
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/server"
 	"github.com/unrolled/render"
 )
 
diff --git a/server/api/config.go b/server/api/config.go
index a9c18d5f7..b6088f6b1 100644
--- a/server/api/config.go
+++ b/server/api/config.go
@@ -25,9 +25,9 @@ import (
 	"github.com/pingcap/errcode"
 	"github.com/pingcap/kvproto/pkg/configpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/apiutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/pkg/apiutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
 	"github.com/pkg/errors"
 	"github.com/unrolled/render"
 	"go.uber.org/zap"
diff --git a/server/api/context.go b/server/api/context.go
index 766e23e3b..4b64c230f 100644
--- a/server/api/context.go
+++ b/server/api/context.go
@@ -16,7 +16,7 @@ package api
 import (
 	"context"
 
-	"github.com/pingcap/pd/server/cluster"
+	"github.com/pingcap/pd/v3/server/cluster"
 )
 
 type contextKey int
diff --git a/server/api/diagnose.go b/server/api/diagnose.go
index 1a66b8aa2..5eafddae0 100644
--- a/server/api/diagnose.go
+++ b/server/api/diagnose.go
@@ -20,7 +20,7 @@ import (
 	"time"
 
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/server"
 	"github.com/pkg/errors"
 	"github.com/unrolled/render"
 )
diff --git a/server/api/health.go b/server/api/health.go
index e67fc8a85..46f3cd620 100644
--- a/server/api/health.go
+++ b/server/api/health.go
@@ -16,8 +16,8 @@ package api
 import (
 	"net/http"
 
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/cluster"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/cluster"
 	"github.com/unrolled/render"
 )
 
diff --git a/server/api/hot_status.go b/server/api/hot_status.go
index df8191838..36cdcb78c 100644
--- a/server/api/hot_status.go
+++ b/server/api/hot_status.go
@@ -16,7 +16,7 @@ package api
 import (
 	"net/http"
 
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/server"
 	"github.com/unrolled/render"
 )
 
diff --git a/server/api/label.go b/server/api/label.go
index 80a76a229..15102184f 100644
--- a/server/api/label.go
+++ b/server/api/label.go
@@ -19,7 +19,7 @@ import (
 	"strings"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/server"
 	"github.com/pkg/errors"
 	"github.com/unrolled/render"
 )
diff --git a/server/api/log.go b/server/api/log.go
index 6caaa077c..bca02e021 100644
--- a/server/api/log.go
+++ b/server/api/log.go
@@ -20,8 +20,8 @@ import (
 	"net/http"
 
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/logutil"
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/pkg/logutil"
+	"github.com/pingcap/pd/v3/server"
 	"github.com/unrolled/render"
 )
 
diff --git a/server/api/member.go b/server/api/member.go
index b7ef8548c..61275dde6 100644
--- a/server/api/member.go
+++ b/server/api/member.go
@@ -22,9 +22,9 @@ import (
 	"github.com/gorilla/mux"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/apiutil"
-	"github.com/pingcap/pd/pkg/etcdutil"
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/pkg/apiutil"
+	"github.com/pingcap/pd/v3/pkg/etcdutil"
+	"github.com/pingcap/pd/v3/server"
 	"github.com/pkg/errors"
 	"github.com/unrolled/render"
 	"go.uber.org/zap"
diff --git a/server/api/metric.go b/server/api/metric.go
index d0ee0cf9e..937007316 100644
--- a/server/api/metric.go
+++ b/server/api/metric.go
@@ -19,8 +19,8 @@ import (
 	"net/url"
 	"strings"
 
-	"github.com/pingcap/pd/pkg/apiutil/serverapi"
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/pkg/apiutil/serverapi"
+	"github.com/pingcap/pd/v3/server"
 )
 
 type queryMetric struct {
diff --git a/server/api/middleware.go b/server/api/middleware.go
index a774e7f15..fee68d5a4 100644
--- a/server/api/middleware.go
+++ b/server/api/middleware.go
@@ -20,9 +20,9 @@ import (
 	"strings"
 
 	"github.com/BurntSushi/toml"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/server/config"
 	"github.com/pkg/errors"
 	"github.com/unrolled/render"
 )
diff --git a/server/api/operator.go b/server/api/operator.go
index d70d095b4..a702ed098 100644
--- a/server/api/operator.go
+++ b/server/api/operator.go
@@ -18,9 +18,9 @@ import (
 	"strconv"
 
 	"github.com/gorilla/mux"
-	"github.com/pingcap/pd/pkg/apiutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/schedule/operator"
+	"github.com/pingcap/pd/v3/pkg/apiutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
 	"github.com/unrolled/render"
 )
 
diff --git a/server/api/plugin.go b/server/api/plugin.go
index 8e14362c1..6a581fa43 100644
--- a/server/api/plugin.go
+++ b/server/api/plugin.go
@@ -19,9 +19,9 @@ import (
 	"os"
 	"strings"
 
-	"github.com/pingcap/pd/pkg/apiutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/cluster"
+	"github.com/pingcap/pd/v3/pkg/apiutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/cluster"
 	"github.com/unrolled/render"
 )
 
diff --git a/server/api/region.go b/server/api/region.go
index a183a0077..80dcb9e35 100644
--- a/server/api/region.go
+++ b/server/api/region.go
@@ -22,8 +22,8 @@ import (
 	"github.com/gorilla/mux"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/core"
 	"github.com/unrolled/render"
 )
 
diff --git a/server/api/router.go b/server/api/router.go
index 18bc79926..ceb20a35c 100644
--- a/server/api/router.go
+++ b/server/api/router.go
@@ -18,7 +18,7 @@ import (
 	"net/http/pprof"
 
 	"github.com/gorilla/mux"
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/server"
 	"github.com/unrolled/render"
 )
 
diff --git a/server/api/rule.go b/server/api/rule.go
index 36a389d4e..284b955e0 100644
--- a/server/api/rule.go
+++ b/server/api/rule.go
@@ -20,11 +20,11 @@ import (
 	"strconv"
 
 	"github.com/gorilla/mux"
-	"github.com/pingcap/pd/pkg/apiutil"
-	"github.com/pingcap/pd/pkg/codec"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/placement"
+	"github.com/pingcap/pd/v3/pkg/apiutil"
+	"github.com/pingcap/pd/v3/pkg/codec"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/placement"
 	"github.com/pkg/errors"
 	"github.com/unrolled/render"
 )
diff --git a/server/api/scheduler.go b/server/api/scheduler.go
index 9cc09bea3..96e0756d2 100644
--- a/server/api/scheduler.go
+++ b/server/api/scheduler.go
@@ -20,10 +20,10 @@ import (
 	"strings"
 
 	"github.com/gorilla/mux"
-	"github.com/pingcap/pd/pkg/apiutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/server/schedulers"
+	"github.com/pingcap/pd/v3/pkg/apiutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/server/schedulers"
 	"github.com/unrolled/render"
 )
 
diff --git a/server/api/server.go b/server/api/server.go
index ee07e0cf9..16d106549 100644
--- a/server/api/server.go
+++ b/server/api/server.go
@@ -18,8 +18,8 @@ import (
 	"net/http"
 
 	"github.com/gorilla/mux"
-	"github.com/pingcap/pd/pkg/apiutil/serverapi"
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/pkg/apiutil/serverapi"
+	"github.com/pingcap/pd/v3/server"
 	"github.com/urfave/negroni"
 )
 
diff --git a/server/api/stats.go b/server/api/stats.go
index 9e5867903..3d8800e19 100644
--- a/server/api/stats.go
+++ b/server/api/stats.go
@@ -16,7 +16,7 @@ package api
 import (
 	"net/http"
 
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/server"
 	"github.com/unrolled/render"
 )
 
diff --git a/server/api/status.go b/server/api/status.go
index a92f50bac..f120608f7 100644
--- a/server/api/status.go
+++ b/server/api/status.go
@@ -16,7 +16,7 @@ package api
 import (
 	"net/http"
 
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/server"
 	"github.com/unrolled/render"
 )
 
diff --git a/server/api/store.go b/server/api/store.go
index a5d5883cf..30ca6e202 100644
--- a/server/api/store.go
+++ b/server/api/store.go
@@ -22,12 +22,12 @@ import (
 	"github.com/gorilla/mux"
 	"github.com/pingcap/errcode"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/apiutil"
-	"github.com/pingcap/pd/pkg/typeutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
+	"github.com/pingcap/pd/v3/pkg/apiutil"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
 	"github.com/pkg/errors"
 	"github.com/unrolled/render"
 )
diff --git a/server/api/trend.go b/server/api/trend.go
index 35fb73107..ed5774f11 100644
--- a/server/api/trend.go
+++ b/server/api/trend.go
@@ -18,9 +18,9 @@ import (
 	"strconv"
 	"time"
 
-	"github.com/pingcap/pd/pkg/typeutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/statistics"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/statistics"
 	"github.com/unrolled/render"
 )
 
diff --git a/server/api/util.go b/server/api/util.go
index 2964b4a37..49efaf793 100644
--- a/server/api/util.go
+++ b/server/api/util.go
@@ -22,9 +22,9 @@ import (
 	"net/url"
 
 	"github.com/pingcap/kvproto/pkg/configpb"
-	pd "github.com/pingcap/pd/client"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config_manager"
+	pd "github.com/pingcap/pd/v3/client"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config_manager"
 	"github.com/pkg/errors"
 )
 
diff --git a/server/cluster/cluster.go b/server/cluster/cluster.go
index 04d2f54c5..27740e46b 100644
--- a/server/cluster/cluster.go
+++ b/server/cluster/cluster.go
@@ -27,18 +27,18 @@ import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/etcdutil"
-	"github.com/pingcap/pd/pkg/logutil"
-	"github.com/pingcap/pd/pkg/typeutil"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/id"
-	syncer "github.com/pingcap/pd/server/region_syncer"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/checker"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/placement"
-	"github.com/pingcap/pd/server/statistics"
+	"github.com/pingcap/pd/v3/pkg/etcdutil"
+	"github.com/pingcap/pd/v3/pkg/logutil"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/id"
+	syncer "github.com/pingcap/pd/v3/server/region_syncer"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/checker"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/placement"
+	"github.com/pingcap/pd/v3/server/statistics"
 	"github.com/pkg/errors"
 	"go.etcd.io/etcd/clientv3"
 	"go.uber.org/zap"
diff --git a/server/cluster/cluster_stat.go b/server/cluster/cluster_stat.go
index 077565538..06c2f8f71 100644
--- a/server/cluster/cluster_stat.go
+++ b/server/cluster/cluster_stat.go
@@ -20,8 +20,8 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/slice"
-	"github.com/pingcap/pd/server/statistics"
+	"github.com/pingcap/pd/v3/pkg/slice"
+	"github.com/pingcap/pd/v3/server/statistics"
 	"go.uber.org/zap"
 )
 
diff --git a/server/cluster/cluster_worker.go b/server/cluster/cluster_worker.go
index 110140637..01bcd2f9d 100644
--- a/server/cluster/cluster_worker.go
+++ b/server/cluster/cluster_worker.go
@@ -20,8 +20,8 @@ import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 )
diff --git a/server/cluster/coordinator.go b/server/cluster/coordinator.go
index 49b87d1f3..ec82b72dd 100644
--- a/server/cluster/coordinator.go
+++ b/server/cluster/coordinator.go
@@ -21,13 +21,13 @@ import (
 	"time"
 
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/logutil"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedulers"
-	"github.com/pingcap/pd/server/statistics"
+	"github.com/pingcap/pd/v3/pkg/logutil"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedulers"
+	"github.com/pingcap/pd/v3/server/statistics"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 )
diff --git a/server/cluster/store_limiter.go b/server/cluster/store_limiter.go
index 5863fc4c5..bfa7248a8 100644
--- a/server/cluster/store_limiter.go
+++ b/server/cluster/store_limiter.go
@@ -18,7 +18,7 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule"
 	"go.uber.org/zap"
 )
 
diff --git a/server/config/config.go b/server/config/config.go
index 0d5942b1f..ae034255a 100644
--- a/server/config/config.go
+++ b/server/config/config.go
@@ -26,10 +26,10 @@ import (
 	"github.com/BurntSushi/toml"
 	"github.com/coreos/go-semver/semver"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/grpcutil"
-	"github.com/pingcap/pd/pkg/metricutil"
-	"github.com/pingcap/pd/pkg/typeutil"
-	"github.com/pingcap/pd/server/schedule"
+	"github.com/pingcap/pd/v3/pkg/grpcutil"
+	"github.com/pingcap/pd/v3/pkg/metricutil"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
+	"github.com/pingcap/pd/v3/server/schedule"
 	"github.com/pkg/errors"
 	"go.etcd.io/etcd/embed"
 	"go.uber.org/zap"
diff --git a/server/config/option.go b/server/config/option.go
index 8fa18cad7..e08877e68 100644
--- a/server/config/option.go
+++ b/server/config/option.go
@@ -23,10 +23,10 @@ import (
 	"github.com/coreos/go-semver/semver"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/typeutil"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/kv"
-	"github.com/pingcap/pd/server/schedule"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/kv"
+	"github.com/pingcap/pd/v3/server/schedule"
 )
 
 // ScheduleOption is a wrapper to access the configuration safely.
diff --git a/server/config_manager/config_manager.go b/server/config_manager/config_manager.go
index f9b47eb65..95a1bc8b9 100644
--- a/server/config_manager/config_manager.go
+++ b/server/config_manager/config_manager.go
@@ -23,9 +23,9 @@ import (
 
 	"github.com/BurntSushi/toml"
 	"github.com/pingcap/kvproto/pkg/configpb"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/member"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/member"
 	"github.com/pkg/errors"
 )
 
diff --git a/server/core/basic_cluster.go b/server/core/basic_cluster.go
index d0655e87b..3cd514581 100644
--- a/server/core/basic_cluster.go
+++ b/server/core/basic_cluster.go
@@ -18,7 +18,7 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/slice"
+	"github.com/pingcap/pd/v3/pkg/slice"
 	"go.uber.org/zap"
 )
 
diff --git a/server/core/region_storage.go b/server/core/region_storage.go
index a07d0c915..2f01c7037 100644
--- a/server/core/region_storage.go
+++ b/server/core/region_storage.go
@@ -21,7 +21,7 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/kv"
+	"github.com/pingcap/pd/v3/server/kv"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 )
diff --git a/server/core/region_tree.go b/server/core/region_tree.go
index 425bfae5a..3fb5649bf 100644
--- a/server/core/region_tree.go
+++ b/server/core/region_tree.go
@@ -19,7 +19,7 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/btree"
+	"github.com/pingcap/pd/v3/pkg/btree"
 	"go.uber.org/zap"
 )
 
diff --git a/server/core/storage.go b/server/core/storage.go
index 5cb8f7357..b283ffc56 100644
--- a/server/core/storage.go
+++ b/server/core/storage.go
@@ -27,7 +27,7 @@ import (
 	"github.com/BurntSushi/toml"
 	"github.com/gogo/protobuf/proto"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/kv"
+	"github.com/pingcap/pd/v3/server/kv"
 	"github.com/pkg/errors"
 	"go.etcd.io/etcd/clientv3"
 )
diff --git a/server/grpc_service.go b/server/grpc_service.go
index d9ec00553..3a9335eb2 100644
--- a/server/grpc_service.go
+++ b/server/grpc_service.go
@@ -25,8 +25,8 @@ import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/server/core"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 	"google.golang.org/grpc/codes"
diff --git a/server/handler.go b/server/handler.go
index a5959fa32..bf90b24da 100644
--- a/server/handler.go
+++ b/server/handler.go
@@ -27,14 +27,14 @@ import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedulers"
-	"github.com/pingcap/pd/server/statistics"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedulers"
+	"github.com/pingcap/pd/v3/server/statistics"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 )
diff --git a/server/heartbeat_streams.go b/server/heartbeat_streams.go
index e91da3ad4..b153ae004 100644
--- a/server/heartbeat_streams.go
+++ b/server/heartbeat_streams.go
@@ -22,10 +22,10 @@ import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/logutil"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/pkg/logutil"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 	"go.uber.org/zap"
 )
 
diff --git a/server/id/id.go b/server/id/id.go
index dbb0153c6..4db3cc42c 100644
--- a/server/id/id.go
+++ b/server/id/id.go
@@ -18,9 +18,9 @@ import (
 	"sync"
 
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/etcdutil"
-	"github.com/pingcap/pd/pkg/typeutil"
-	"github.com/pingcap/pd/server/kv"
+	"github.com/pingcap/pd/v3/pkg/etcdutil"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
+	"github.com/pingcap/pd/v3/server/kv"
 	"github.com/pkg/errors"
 	"go.etcd.io/etcd/clientv3"
 	"go.uber.org/zap"
diff --git a/server/join/join.go b/server/join/join.go
index 873d9f1a2..1d0e200e9 100644
--- a/server/join/join.go
+++ b/server/join/join.go
@@ -23,8 +23,8 @@ import (
 
 	"github.com/pingcap/failpoint"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/etcdutil"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/pkg/etcdutil"
+	"github.com/pingcap/pd/v3/server/config"
 	"github.com/pkg/errors"
 	"go.etcd.io/etcd/clientv3"
 	"go.etcd.io/etcd/embed"
diff --git a/server/kv/etcd_kv.go b/server/kv/etcd_kv.go
index b69b2119e..c5c0bbf20 100644
--- a/server/kv/etcd_kv.go
+++ b/server/kv/etcd_kv.go
@@ -20,7 +20,7 @@ import (
 	"time"
 
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/etcdutil"
+	"github.com/pingcap/pd/v3/pkg/etcdutil"
 	"github.com/pkg/errors"
 	"go.etcd.io/etcd/clientv3"
 	"go.uber.org/zap"
diff --git a/server/member/leader.go b/server/member/leader.go
index b9e050c65..9f58e9d86 100644
--- a/server/member/leader.go
+++ b/server/member/leader.go
@@ -26,9 +26,9 @@ import (
 	"github.com/pingcap/failpoint"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/etcdutil"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/kv"
+	"github.com/pingcap/pd/v3/pkg/etcdutil"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/kv"
 	"github.com/pkg/errors"
 	"go.etcd.io/etcd/clientv3"
 	"go.etcd.io/etcd/embed"
diff --git a/server/region_syncer/client.go b/server/region_syncer/client.go
index e45e439ca..5eca69511 100644
--- a/server/region_syncer/client.go
+++ b/server/region_syncer/client.go
@@ -19,8 +19,8 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/grpcutil"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/pkg/grpcutil"
+	"github.com/pingcap/pd/v3/server/core"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 	"google.golang.org/grpc"
diff --git a/server/region_syncer/history_buffer.go b/server/region_syncer/history_buffer.go
index 081cba85a..2b3b98967 100644
--- a/server/region_syncer/history_buffer.go
+++ b/server/region_syncer/history_buffer.go
@@ -18,8 +18,8 @@ import (
 	"sync"
 
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/kv"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/kv"
 	"go.uber.org/zap"
 )
 
diff --git a/server/region_syncer/server.go b/server/region_syncer/server.go
index 1a84596b5..3c3a0db3e 100644
--- a/server/region_syncer/server.go
+++ b/server/region_syncer/server.go
@@ -23,8 +23,8 @@ import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/grpcutil"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/pkg/grpcutil"
+	"github.com/pingcap/pd/v3/server/core"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 	"google.golang.org/grpc/codes"
diff --git a/server/schedule/checker/learner_checker.go b/server/schedule/checker/learner_checker.go
index 316ff0980..2f97ecd13 100644
--- a/server/schedule/checker/learner_checker.go
+++ b/server/schedule/checker/learner_checker.go
@@ -15,9 +15,9 @@ package checker
 
 import (
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 	"go.uber.org/zap"
 )
 
diff --git a/server/schedule/checker/merge_checker.go b/server/schedule/checker/merge_checker.go
index 358e1c540..83ccba3f9 100644
--- a/server/schedule/checker/merge_checker.go
+++ b/server/schedule/checker/merge_checker.go
@@ -19,12 +19,12 @@ import (
 	"time"
 
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/cache"
-	"github.com/pingcap/pd/pkg/codec"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/placement"
+	"github.com/pingcap/pd/v3/pkg/cache"
+	"github.com/pingcap/pd/v3/pkg/codec"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/placement"
 	"go.uber.org/zap"
 )
 
diff --git a/server/schedule/checker/replica_checker.go b/server/schedule/checker/replica_checker.go
index 1b5cb9b32..6abe315aa 100644
--- a/server/schedule/checker/replica_checker.go
+++ b/server/schedule/checker/replica_checker.go
@@ -18,11 +18,11 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/selector"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/selector"
 	"go.uber.org/zap"
 )
 
diff --git a/server/schedule/checker/rule_checker.go b/server/schedule/checker/rule_checker.go
index 569f70683..d8590fb1b 100644
--- a/server/schedule/checker/rule_checker.go
+++ b/server/schedule/checker/rule_checker.go
@@ -17,12 +17,12 @@ import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/placement"
-	"github.com/pingcap/pd/server/schedule/selector"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/placement"
+	"github.com/pingcap/pd/v3/server/schedule/selector"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 )
diff --git a/server/schedule/checker_controller.go b/server/schedule/checker_controller.go
index d0edb36a3..7f6eb05a2 100644
--- a/server/schedule/checker_controller.go
+++ b/server/schedule/checker_controller.go
@@ -16,11 +16,11 @@ package schedule
 import (
 	"context"
 
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/checker"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/placement"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/checker"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/placement"
 )
 
 // CheckerController is used to manage all checkers.
diff --git a/server/schedule/filter/filters.go b/server/schedule/filter/filters.go
index cb3ba7342..b1fefff55 100644
--- a/server/schedule/filter/filters.go
+++ b/server/schedule/filter/filters.go
@@ -16,11 +16,11 @@ package filter
 import (
 	"fmt"
 
-	"github.com/pingcap/pd/pkg/cache"
-	"github.com/pingcap/pd/pkg/slice"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/placement"
+	"github.com/pingcap/pd/v3/pkg/cache"
+	"github.com/pingcap/pd/v3/pkg/slice"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/placement"
 )
 
 // revive:disable:unused-parameter
diff --git a/server/schedule/operator/builder.go b/server/schedule/operator/builder.go
index 8d07571b7..9311db3da 100644
--- a/server/schedule/operator/builder.go
+++ b/server/schedule/operator/builder.go
@@ -18,9 +18,9 @@ import (
 	"sort"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/placement"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/placement"
 	"github.com/pkg/errors"
 )
 
diff --git a/server/schedule/operator/create_operator.go b/server/schedule/operator/create_operator.go
index 58db0b7d6..1b24c1586 100644
--- a/server/schedule/operator/create_operator.go
+++ b/server/schedule/operator/create_operator.go
@@ -19,7 +19,7 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 // CreateAddPeerOperator creates an operator that adds a new peer.
diff --git a/server/schedule/operator/influence.go b/server/schedule/operator/influence.go
index 51d3bd3a7..43e2227d6 100644
--- a/server/schedule/operator/influence.go
+++ b/server/schedule/operator/influence.go
@@ -13,7 +13,7 @@
 
 package operator
 
-import "github.com/pingcap/pd/server/core"
+import "github.com/pingcap/pd/v3/server/core"
 
 // OpInfluence records the influence of the cluster.
 type OpInfluence struct {
diff --git a/server/schedule/operator/operator.go b/server/schedule/operator/operator.go
index f55ec096c..1066e9d24 100644
--- a/server/schedule/operator/operator.go
+++ b/server/schedule/operator/operator.go
@@ -21,9 +21,9 @@ import (
 	"time"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/placement"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/placement"
 	"github.com/prometheus/client_golang/prometheus"
 )
 
diff --git a/server/schedule/operator/step.go b/server/schedule/operator/step.go
index ce86372d8..14150ab6e 100644
--- a/server/schedule/operator/step.go
+++ b/server/schedule/operator/step.go
@@ -20,7 +20,7 @@ import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/core"
 	"go.uber.org/zap"
 )
 
diff --git a/server/schedule/operator_controller.go b/server/schedule/operator_controller.go
index 5337d6209..2201602ba 100644
--- a/server/schedule/operator_controller.go
+++ b/server/schedule/operator_controller.go
@@ -27,10 +27,10 @@ import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/cache"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/pkg/cache"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 	"go.uber.org/zap"
 )
 
diff --git a/server/schedule/operator_queue.go b/server/schedule/operator_queue.go
index 5c755cdec..0fa345ffb 100644
--- a/server/schedule/operator_queue.go
+++ b/server/schedule/operator_queue.go
@@ -16,7 +16,7 @@ package schedule
 import (
 	"time"
 
-	"github.com/pingcap/pd/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
 )
 
 type operatorWithTime struct {
diff --git a/server/schedule/opt/healthy.go b/server/schedule/opt/healthy.go
index 6fbe2dc5d..d9b4c00bd 100644
--- a/server/schedule/opt/healthy.go
+++ b/server/schedule/opt/healthy.go
@@ -13,7 +13,7 @@
 
 package opt
 
-import "github.com/pingcap/pd/server/core"
+import "github.com/pingcap/pd/v3/server/core"
 
 // IsRegionHealthy checks if a region is healthy for scheduling. It requires the
 // region does not have any down or pending peers. And when placement rules
diff --git a/server/schedule/opt/opts.go b/server/schedule/opt/opts.go
index e54ab3ea8..0c9d3af97 100644
--- a/server/schedule/opt/opts.go
+++ b/server/schedule/opt/opts.go
@@ -18,9 +18,9 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/placement"
-	"github.com/pingcap/pd/server/statistics"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/placement"
+	"github.com/pingcap/pd/v3/server/statistics"
 )
 
 // Options for schedulers.
diff --git a/server/schedule/placement/fit.go b/server/schedule/placement/fit.go
index 66a1383d0..611b70e01 100644
--- a/server/schedule/placement/fit.go
+++ b/server/schedule/placement/fit.go
@@ -17,8 +17,8 @@ import (
 	"sort"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/slice"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/pkg/slice"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 // RegionFit is the result of fitting a region's peers to rule list.
diff --git a/server/schedule/placement/label_constraint.go b/server/schedule/placement/label_constraint.go
index 2a90c2fed..51df1576d 100644
--- a/server/schedule/placement/label_constraint.go
+++ b/server/schedule/placement/label_constraint.go
@@ -14,8 +14,8 @@
 package placement
 
 import (
-	"github.com/pingcap/pd/pkg/slice"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/pkg/slice"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 // LabelConstraintOp defines how a LabelConstraint matches a store. It can be one of
diff --git a/server/schedule/placement/rule_manager.go b/server/schedule/placement/rule_manager.go
index d76bd2a92..6599fd8ef 100644
--- a/server/schedule/placement/rule_manager.go
+++ b/server/schedule/placement/rule_manager.go
@@ -20,7 +20,7 @@ import (
 	"sort"
 	"sync"
 
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/core"
 	"github.com/pkg/errors"
 )
 
diff --git a/server/schedule/range_cluster.go b/server/schedule/range_cluster.go
index a1b92406e..f34569213 100644
--- a/server/schedule/range_cluster.go
+++ b/server/schedule/range_cluster.go
@@ -16,8 +16,8 @@ package schedule
 import (
 	"github.com/gogo/protobuf/proto"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 )
 
 // RangeCluster isolates the cluster by range.
diff --git a/server/schedule/region_scatterer.go b/server/schedule/region_scatterer.go
index f45a411b6..275f2ad36 100644
--- a/server/schedule/region_scatterer.go
+++ b/server/schedule/region_scatterer.go
@@ -19,10 +19,10 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 )
diff --git a/server/schedule/scheduler.go b/server/schedule/scheduler.go
index 9a6a026b0..606914a35 100644
--- a/server/schedule/scheduler.go
+++ b/server/schedule/scheduler.go
@@ -20,9 +20,9 @@ import (
 	"time"
 
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 )
diff --git a/server/schedule/selector/selector.go b/server/schedule/selector/selector.go
index da988dfdf..25890450d 100644
--- a/server/schedule/selector/selector.go
+++ b/server/schedule/selector/selector.go
@@ -16,9 +16,9 @@ package selector
 import (
 	"math/rand"
 
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 )
 
 // BalanceSelector selects source/target from store candidates based on their
diff --git a/server/schedule/store_limit.go b/server/schedule/store_limit.go
index 6489ab7eb..2f53d8988 100644
--- a/server/schedule/store_limit.go
+++ b/server/schedule/store_limit.go
@@ -17,7 +17,7 @@ import (
 	"time"
 
 	"github.com/juju/ratelimit"
-	"github.com/pingcap/pd/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
 )
 
 // StoreLimitMode indicates the strategy to set store limit
diff --git a/server/schedule/waiting_operator.go b/server/schedule/waiting_operator.go
index 98b2b5fcb..80b7a5d3e 100644
--- a/server/schedule/waiting_operator.go
+++ b/server/schedule/waiting_operator.go
@@ -17,7 +17,7 @@ import (
 	"math/rand"
 	"time"
 
-	"github.com/pingcap/pd/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
 )
 
 // PriorityWeight is used to represent the weight of different priorities of operators.
diff --git a/server/schedulers/adjacent_region.go b/server/schedulers/adjacent_region.go
index 70bb90fe5..cc087f514 100644
--- a/server/schedulers/adjacent_region.go
+++ b/server/schedulers/adjacent_region.go
@@ -20,12 +20,12 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/selector"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/selector"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 )
diff --git a/server/schedulers/balance_leader.go b/server/schedulers/balance_leader.go
index 68a68397d..9dee88784 100644
--- a/server/schedulers/balance_leader.go
+++ b/server/schedulers/balance_leader.go
@@ -18,11 +18,11 @@ import (
 	"strconv"
 
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 	"github.com/pkg/errors"
 	"github.com/prometheus/client_golang/prometheus"
 	"go.uber.org/zap"
diff --git a/server/schedulers/balance_region.go b/server/schedulers/balance_region.go
index 48a7917e3..3e65d6c60 100644
--- a/server/schedulers/balance_region.go
+++ b/server/schedulers/balance_region.go
@@ -19,12 +19,12 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/checker"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/checker"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 	"github.com/pkg/errors"
 	"github.com/prometheus/client_golang/prometheus"
 	"go.uber.org/zap"
diff --git a/server/schedulers/base_scheduler.go b/server/schedulers/base_scheduler.go
index d085a0ded..a72094185 100644
--- a/server/schedulers/base_scheduler.go
+++ b/server/schedulers/base_scheduler.go
@@ -19,8 +19,8 @@ import (
 	"time"
 
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 )
 
 // options for interval of schedulers
diff --git a/server/schedulers/evict_leader.go b/server/schedulers/evict_leader.go
index d2e4b532e..6bc8b41b2 100644
--- a/server/schedulers/evict_leader.go
+++ b/server/schedulers/evict_leader.go
@@ -20,13 +20,13 @@ import (
 
 	"github.com/gorilla/mux"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/apiutil"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/selector"
+	"github.com/pingcap/pd/v3/pkg/apiutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/selector"
 	"github.com/pkg/errors"
 	"github.com/unrolled/render"
 	"go.uber.org/zap"
diff --git a/server/schedulers/grant_leader.go b/server/schedulers/grant_leader.go
index 979926862..cc9f97e02 100644
--- a/server/schedulers/grant_leader.go
+++ b/server/schedulers/grant_leader.go
@@ -20,11 +20,11 @@ import (
 
 	"github.com/gorilla/mux"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/apiutil"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/pkg/apiutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 	"github.com/pkg/errors"
 	"github.com/unrolled/render"
 	"go.uber.org/zap"
diff --git a/server/schedulers/hot_region.go b/server/schedulers/hot_region.go
index 98038a6f9..74ccadaf7 100644
--- a/server/schedulers/hot_region.go
+++ b/server/schedulers/hot_region.go
@@ -22,12 +22,12 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/statistics"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/statistics"
 	"go.uber.org/zap"
 )
 
diff --git a/server/schedulers/label.go b/server/schedulers/label.go
index 34a5553df..fee3bab17 100644
--- a/server/schedulers/label.go
+++ b/server/schedulers/label.go
@@ -15,12 +15,12 @@ package schedulers
 
 import (
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/selector"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/selector"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 )
diff --git a/server/schedulers/random_merge.go b/server/schedulers/random_merge.go
index 73d6b4af7..4671528bc 100644
--- a/server/schedulers/random_merge.go
+++ b/server/schedulers/random_merge.go
@@ -17,12 +17,12 @@ import (
 	"math/rand"
 
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/selector"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/selector"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 )
diff --git a/server/schedulers/scatter_range.go b/server/schedulers/scatter_range.go
index acf9e38ca..f48e90e25 100644
--- a/server/schedulers/scatter_range.go
+++ b/server/schedulers/scatter_range.go
@@ -19,11 +19,11 @@ import (
 	"sync"
 
 	"github.com/gorilla/mux"
-	"github.com/pingcap/pd/pkg/apiutil"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/pkg/apiutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 	"github.com/pkg/errors"
 	"github.com/unrolled/render"
 )
diff --git a/server/schedulers/shuffle_hot_region.go b/server/schedulers/shuffle_hot_region.go
index 3ac1480ab..60f63787f 100644
--- a/server/schedulers/shuffle_hot_region.go
+++ b/server/schedulers/shuffle_hot_region.go
@@ -20,11 +20,11 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 	"go.uber.org/zap"
 )
 
diff --git a/server/schedulers/shuffle_leader.go b/server/schedulers/shuffle_leader.go
index 41f8dfa32..674903a49 100644
--- a/server/schedulers/shuffle_leader.go
+++ b/server/schedulers/shuffle_leader.go
@@ -15,12 +15,12 @@ package schedulers
 
 import (
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/selector"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/selector"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 )
diff --git a/server/schedulers/shuffle_region.go b/server/schedulers/shuffle_region.go
index 3a2da796f..b5de01ddf 100644
--- a/server/schedulers/shuffle_region.go
+++ b/server/schedulers/shuffle_region.go
@@ -15,12 +15,12 @@ package schedulers
 
 import (
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/filter"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/selector"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/selector"
 	"github.com/pkg/errors"
 )
 
diff --git a/server/schedulers/utils.go b/server/schedulers/utils.go
index 682c43b23..515cd118f 100644
--- a/server/schedulers/utils.go
+++ b/server/schedulers/utils.go
@@ -21,10 +21,10 @@ import (
 
 	"github.com/montanaflynn/stats"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/statistics"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/statistics"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 )
diff --git a/server/server.go b/server/server.go
index f57afcf16..cd6a4bb34 100644
--- a/server/server.go
+++ b/server/server.go
@@ -38,21 +38,21 @@ import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	pd "github.com/pingcap/pd/client"
-	"github.com/pingcap/pd/pkg/etcdutil"
-	"github.com/pingcap/pd/pkg/grpcutil"
-	"github.com/pingcap/pd/pkg/logutil"
-	"github.com/pingcap/pd/pkg/typeutil"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/server/config"
-	configmanager "github.com/pingcap/pd/server/config_manager"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/id"
-	"github.com/pingcap/pd/server/kv"
-	"github.com/pingcap/pd/server/member"
-	syncer "github.com/pingcap/pd/server/region_syncer"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/tso"
+	pd "github.com/pingcap/pd/v3/client"
+	"github.com/pingcap/pd/v3/pkg/etcdutil"
+	"github.com/pingcap/pd/v3/pkg/grpcutil"
+	"github.com/pingcap/pd/v3/pkg/logutil"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/server/config"
+	configmanager "github.com/pingcap/pd/v3/server/config_manager"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/id"
+	"github.com/pingcap/pd/v3/server/kv"
+	"github.com/pingcap/pd/v3/server/member"
+	syncer "github.com/pingcap/pd/v3/server/region_syncer"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/tso"
 	"github.com/pkg/errors"
 	"github.com/urfave/negroni"
 	"go.etcd.io/etcd/clientv3"
diff --git a/server/statistics/hot_cache.go b/server/statistics/hot_cache.go
index 2c84dd2ec..2760e57bb 100644
--- a/server/statistics/hot_cache.go
+++ b/server/statistics/hot_cache.go
@@ -16,7 +16,7 @@ package statistics
 import (
 	"math/rand"
 
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 // Denoising is an option to calculate flow base on the real heartbeats. Should
diff --git a/server/statistics/hot_peer_cache.go b/server/statistics/hot_peer_cache.go
index 0f18a6eb9..a18c249cf 100644
--- a/server/statistics/hot_peer_cache.go
+++ b/server/statistics/hot_peer_cache.go
@@ -18,7 +18,7 @@ import (
 	"time"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 const (
diff --git a/server/statistics/region.go b/server/statistics/region.go
index 5dcd9e39f..bc2d0277a 100644
--- a/server/statistics/region.go
+++ b/server/statistics/region.go
@@ -14,7 +14,7 @@
 package statistics
 
 import (
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 const (
diff --git a/server/statistics/region_collection.go b/server/statistics/region_collection.go
index 3dda7f4e2..2d48b5cf9 100644
--- a/server/statistics/region_collection.go
+++ b/server/statistics/region_collection.go
@@ -14,7 +14,7 @@
 package statistics
 
 import (
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 // RegionStatisticType represents the type of the region's status.
diff --git a/server/statistics/region_stat_informer.go b/server/statistics/region_stat_informer.go
index efe490d88..3c186f68c 100644
--- a/server/statistics/region_stat_informer.go
+++ b/server/statistics/region_stat_informer.go
@@ -13,7 +13,7 @@
 
 package statistics
 
-import "github.com/pingcap/pd/server/core"
+import "github.com/pingcap/pd/v3/server/core"
 
 // RegionStatInformer provides access to a shared informer of statistics.
 type RegionStatInformer interface {
diff --git a/server/statistics/schedule_options.go b/server/statistics/schedule_options.go
index e427c3f8d..76ba3c7ef 100644
--- a/server/statistics/schedule_options.go
+++ b/server/statistics/schedule_options.go
@@ -16,7 +16,7 @@ package statistics
 import (
 	"time"
 
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 // ScheduleOptions is an interface to access configurations.
diff --git a/server/statistics/store.go b/server/statistics/store.go
index 71a0b3d7a..28835eb7f 100644
--- a/server/statistics/store.go
+++ b/server/statistics/store.go
@@ -18,7 +18,7 @@ import (
 	"time"
 
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 const (
diff --git a/server/statistics/store_collection.go b/server/statistics/store_collection.go
index f5dc39770..98feb3939 100644
--- a/server/statistics/store_collection.go
+++ b/server/statistics/store_collection.go
@@ -18,7 +18,7 @@ import (
 	"strconv"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 const (
diff --git a/server/tso/tso.go b/server/tso/tso.go
index 5bc05de47..35625d81d 100644
--- a/server/tso/tso.go
+++ b/server/tso/tso.go
@@ -22,11 +22,11 @@ import (
 	"github.com/pingcap/failpoint"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/etcdutil"
-	"github.com/pingcap/pd/pkg/tsoutil"
-	"github.com/pingcap/pd/pkg/typeutil"
-	"github.com/pingcap/pd/server/kv"
-	"github.com/pingcap/pd/server/member"
+	"github.com/pingcap/pd/v3/pkg/etcdutil"
+	"github.com/pingcap/pd/v3/pkg/tsoutil"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
+	"github.com/pingcap/pd/v3/server/kv"
+	"github.com/pingcap/pd/v3/server/member"
 	"github.com/pkg/errors"
 	"go.etcd.io/etcd/clientv3"
 	"go.uber.org/zap"
diff --git a/server/util.go b/server/util.go
index 517ed8dd3..47cae05cb 100644
--- a/server/util.go
+++ b/server/util.go
@@ -23,10 +23,10 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/etcdutil"
-	"github.com/pingcap/pd/pkg/typeutil"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/pkg/etcdutil"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/server/config"
 	"github.com/pkg/errors"
 	"go.etcd.io/etcd/clientv3"
 	"go.uber.org/zap"
diff --git a/tools/pd-analysis/main.go b/tools/pd-analysis/main.go
index 09b64a5ef..0cb5aff1d 100644
--- a/tools/pd-analysis/main.go
+++ b/tools/pd-analysis/main.go
@@ -18,7 +18,7 @@ import (
 	"os"
 
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/tools/pd-analysis/analysis"
+	"github.com/pingcap/pd/v3/tools/pd-analysis/analysis"
 	"go.uber.org/zap"
 )
 
diff --git a/tools/pd-backup/main.go b/tools/pd-backup/main.go
index ebc83921f..038bd292a 100644
--- a/tools/pd-backup/main.go
+++ b/tools/pd-backup/main.go
@@ -20,7 +20,7 @@ import (
 	"strings"
 	"time"
 
-	"github.com/pingcap/pd/tools/pd-backup/pdbackup"
+	"github.com/pingcap/pd/v3/tools/pd-backup/pdbackup"
 	"go.etcd.io/etcd/clientv3"
 	"go.etcd.io/etcd/pkg/transport"
 )
diff --git a/tools/pd-backup/pdbackup/backup.go b/tools/pd-backup/pdbackup/backup.go
index 7cafc8597..b79b71dc6 100644
--- a/tools/pd-backup/pdbackup/backup.go
+++ b/tools/pd-backup/pdbackup/backup.go
@@ -24,9 +24,9 @@ import (
 	"path"
 	"strconv"
 
-	"github.com/pingcap/pd/pkg/etcdutil"
-	"github.com/pingcap/pd/pkg/typeutil"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/pkg/etcdutil"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
+	"github.com/pingcap/pd/v3/server/config"
 	"go.etcd.io/etcd/clientv3"
 )
 
diff --git a/tools/pd-ctl/main.go b/tools/pd-ctl/main.go
index 855ff4b3a..267b4bac4 100644
--- a/tools/pd-ctl/main.go
+++ b/tools/pd-ctl/main.go
@@ -24,8 +24,8 @@ import (
 
 	"github.com/chzyer/readline"
 	shellwords "github.com/mattn/go-shellwords"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/tools/pd-ctl/pdctl"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/tools/pd-ctl/pdctl"
 	flag "github.com/spf13/pflag"
 )
 
diff --git a/tools/pd-ctl/pdctl/command/plugin_command.go b/tools/pd-ctl/pdctl/command/plugin_command.go
index 4f374a099..a7d4bff37 100644
--- a/tools/pd-ctl/pdctl/command/plugin_command.go
+++ b/tools/pd-ctl/pdctl/command/plugin_command.go
@@ -18,7 +18,7 @@ import (
 	"encoding/json"
 	"net/http"
 
-	"github.com/pingcap/pd/server/cluster"
+	"github.com/pingcap/pd/v3/server/cluster"
 	"github.com/spf13/cobra"
 )
 
diff --git a/tools/pd-ctl/pdctl/command/tso_command.go b/tools/pd-ctl/pdctl/command/tso_command.go
index f8d0189b6..60425ba58 100644
--- a/tools/pd-ctl/pdctl/command/tso_command.go
+++ b/tools/pd-ctl/pdctl/command/tso_command.go
@@ -16,7 +16,7 @@ package command
 import (
 	"strconv"
 
-	"github.com/pingcap/pd/pkg/tsoutil"
+	"github.com/pingcap/pd/v3/pkg/tsoutil"
 	"github.com/spf13/cobra"
 )
 
diff --git a/tools/pd-ctl/pdctl/ctl.go b/tools/pd-ctl/pdctl/ctl.go
index 6001f0361..82207a3f8 100644
--- a/tools/pd-ctl/pdctl/ctl.go
+++ b/tools/pd-ctl/pdctl/ctl.go
@@ -16,7 +16,7 @@ package pdctl
 import (
 	"os"
 
-	"github.com/pingcap/pd/tools/pd-ctl/pdctl/command"
+	"github.com/pingcap/pd/v3/tools/pd-ctl/pdctl/command"
 	"github.com/spf13/cobra"
 )
 
diff --git a/tools/pd-recover/main.go b/tools/pd-recover/main.go
index f5c7c6bc1..6ac3f129f 100644
--- a/tools/pd-recover/main.go
+++ b/tools/pd-recover/main.go
@@ -11,7 +11,7 @@ import (
 	"time"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/typeutil"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
 	"go.etcd.io/etcd/clientv3"
 	"go.etcd.io/etcd/pkg/transport"
 )
diff --git a/tools/pd-simulator/main.go b/tools/pd-simulator/main.go
index a05292cfd..02bd7ee8c 100644
--- a/tools/pd-simulator/main.go
+++ b/tools/pd-simulator/main.go
@@ -24,19 +24,19 @@ import (
 
 	"github.com/BurntSushi/toml"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/logutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/api"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/statistics"
-	"github.com/pingcap/pd/tools/pd-analysis/analysis"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/cases"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/pkg/logutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/api"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/statistics"
+	"github.com/pingcap/pd/v3/tools/pd-analysis/analysis"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/cases"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 	"go.uber.org/zap"
 
 	// Register schedulers.
-	_ "github.com/pingcap/pd/server/schedulers"
+	_ "github.com/pingcap/pd/v3/server/schedulers"
 )
 
 var (
diff --git a/tools/pd-simulator/simulator/cases/add_nodes.go b/tools/pd-simulator/simulator/cases/add_nodes.go
index 965abb794..360b820b8 100644
--- a/tools/pd-simulator/simulator/cases/add_nodes.go
+++ b/tools/pd-simulator/simulator/cases/add_nodes.go
@@ -17,9 +17,9 @@ import (
 	"math/rand"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/info"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/info"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 	"go.uber.org/zap"
 )
 
diff --git a/tools/pd-simulator/simulator/cases/add_nodes_dynamic.go b/tools/pd-simulator/simulator/cases/add_nodes_dynamic.go
index 3cad22778..2c43a860b 100644
--- a/tools/pd-simulator/simulator/cases/add_nodes_dynamic.go
+++ b/tools/pd-simulator/simulator/cases/add_nodes_dynamic.go
@@ -17,9 +17,9 @@ import (
 	"math/rand"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/info"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/info"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 	"go.uber.org/zap"
 )
 
diff --git a/tools/pd-simulator/simulator/cases/balance_leader.go b/tools/pd-simulator/simulator/cases/balance_leader.go
index 023102e59..0fefa2677 100644
--- a/tools/pd-simulator/simulator/cases/balance_leader.go
+++ b/tools/pd-simulator/simulator/cases/balance_leader.go
@@ -15,9 +15,9 @@ package cases
 
 import (
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/info"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/info"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 	"go.uber.org/zap"
 )
 
diff --git a/tools/pd-simulator/simulator/cases/cases.go b/tools/pd-simulator/simulator/cases/cases.go
index 84c7f9f01..607f44f6c 100644
--- a/tools/pd-simulator/simulator/cases/cases.go
+++ b/tools/pd-simulator/simulator/cases/cases.go
@@ -15,9 +15,9 @@ package cases
 
 import (
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/info"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/info"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 )
 
 // Store is used to simulate tikv.
diff --git a/tools/pd-simulator/simulator/cases/delete_nodes.go b/tools/pd-simulator/simulator/cases/delete_nodes.go
index c1d90a2dc..43527d7eb 100644
--- a/tools/pd-simulator/simulator/cases/delete_nodes.go
+++ b/tools/pd-simulator/simulator/cases/delete_nodes.go
@@ -17,9 +17,9 @@ import (
 	"math/rand"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/info"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/info"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 	"go.uber.org/zap"
 )
 
diff --git a/tools/pd-simulator/simulator/cases/hot_read.go b/tools/pd-simulator/simulator/cases/hot_read.go
index 5d1ed4c58..5527d0390 100644
--- a/tools/pd-simulator/simulator/cases/hot_read.go
+++ b/tools/pd-simulator/simulator/cases/hot_read.go
@@ -17,9 +17,9 @@ import (
 	"math/rand"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/info"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/info"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 	"go.uber.org/zap"
 )
 
diff --git a/tools/pd-simulator/simulator/cases/hot_write.go b/tools/pd-simulator/simulator/cases/hot_write.go
index 2dc0ede42..90f73a1f9 100644
--- a/tools/pd-simulator/simulator/cases/hot_write.go
+++ b/tools/pd-simulator/simulator/cases/hot_write.go
@@ -19,9 +19,9 @@ import (
 	"go.uber.org/zap"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/info"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/info"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 )
 
 func newHotWrite() *Case {
diff --git a/tools/pd-simulator/simulator/cases/import_data.go b/tools/pd-simulator/simulator/cases/import_data.go
index b06ca4888..0be89ae71 100644
--- a/tools/pd-simulator/simulator/cases/import_data.go
+++ b/tools/pd-simulator/simulator/cases/import_data.go
@@ -21,10 +21,10 @@ import (
 	"go.uber.org/zap"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/codec"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/info"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/pkg/codec"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/info"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 )
 
 func newImportData() *Case {
diff --git a/tools/pd-simulator/simulator/cases/makeup_down_replica.go b/tools/pd-simulator/simulator/cases/makeup_down_replica.go
index 495ff4a0c..dca2030e8 100644
--- a/tools/pd-simulator/simulator/cases/makeup_down_replica.go
+++ b/tools/pd-simulator/simulator/cases/makeup_down_replica.go
@@ -15,9 +15,9 @@ package cases
 
 import (
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/info"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/info"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 	"go.uber.org/zap"
 )
 
diff --git a/tools/pd-simulator/simulator/cases/redundant_balance_region.go b/tools/pd-simulator/simulator/cases/redundant_balance_region.go
index 0b2397393..9a602c23c 100644
--- a/tools/pd-simulator/simulator/cases/redundant_balance_region.go
+++ b/tools/pd-simulator/simulator/cases/redundant_balance_region.go
@@ -17,9 +17,9 @@ import (
 	"time"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/info"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/info"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 	"go.uber.org/zap"
 )
 
diff --git a/tools/pd-simulator/simulator/cases/region_merge.go b/tools/pd-simulator/simulator/cases/region_merge.go
index 7fdc83860..cb276da84 100644
--- a/tools/pd-simulator/simulator/cases/region_merge.go
+++ b/tools/pd-simulator/simulator/cases/region_merge.go
@@ -17,9 +17,9 @@ import (
 	"math/rand"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/info"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/info"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 	"go.uber.org/zap"
 )
 
diff --git a/tools/pd-simulator/simulator/cases/region_split.go b/tools/pd-simulator/simulator/cases/region_split.go
index 4bbb57c36..279795457 100644
--- a/tools/pd-simulator/simulator/cases/region_split.go
+++ b/tools/pd-simulator/simulator/cases/region_split.go
@@ -15,9 +15,9 @@ package cases
 
 import (
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/info"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/info"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 	"go.uber.org/zap"
 )
 
diff --git a/tools/pd-simulator/simulator/client.go b/tools/pd-simulator/simulator/client.go
index 6e05ff1f3..ccbea9332 100644
--- a/tools/pd-simulator/simulator/client.go
+++ b/tools/pd-simulator/simulator/client.go
@@ -23,8 +23,8 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 	"github.com/pkg/errors"
 	"google.golang.org/grpc"
 )
diff --git a/tools/pd-simulator/simulator/config.go b/tools/pd-simulator/simulator/config.go
index 2215e2125..1a59109c9 100644
--- a/tools/pd-simulator/simulator/config.go
+++ b/tools/pd-simulator/simulator/config.go
@@ -5,9 +5,9 @@ import (
 	"io/ioutil"
 	"time"
 
-	"github.com/pingcap/pd/pkg/tempurl"
-	"github.com/pingcap/pd/pkg/typeutil"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/pkg/tempurl"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
+	"github.com/pingcap/pd/v3/server/config"
 )
 
 const (
diff --git a/tools/pd-simulator/simulator/conn.go b/tools/pd-simulator/simulator/conn.go
index ffa00a029..f084e3a11 100644
--- a/tools/pd-simulator/simulator/conn.go
+++ b/tools/pd-simulator/simulator/conn.go
@@ -15,7 +15,7 @@ package simulator
 
 import (
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/cases"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/cases"
 )
 
 // Connection records the informations of connection among nodes.
diff --git a/tools/pd-simulator/simulator/drive.go b/tools/pd-simulator/simulator/drive.go
index 1d52498a7..dd5b6dfc6 100644
--- a/tools/pd-simulator/simulator/drive.go
+++ b/tools/pd-simulator/simulator/drive.go
@@ -20,10 +20,10 @@ import (
 	"go.uber.org/zap"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/cases"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/info"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/cases"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/info"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 	"github.com/pkg/errors"
 )
 
diff --git a/tools/pd-simulator/simulator/event.go b/tools/pd-simulator/simulator/event.go
index bc42193fb..e8283006e 100644
--- a/tools/pd-simulator/simulator/event.go
+++ b/tools/pd-simulator/simulator/event.go
@@ -16,9 +16,9 @@ package simulator
 import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/cases"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/cases"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 	"go.uber.org/zap"
 )
 
diff --git a/tools/pd-simulator/simulator/node.go b/tools/pd-simulator/simulator/node.go
index ba7fdfeca..570cd227b 100644
--- a/tools/pd-simulator/simulator/node.go
+++ b/tools/pd-simulator/simulator/node.go
@@ -24,9 +24,9 @@ import (
 
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/cases"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/info"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/cases"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/info"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 )
 
 const (
diff --git a/tools/pd-simulator/simulator/raft.go b/tools/pd-simulator/simulator/raft.go
index c0c2ba1e7..97e521c1b 100644
--- a/tools/pd-simulator/simulator/raft.go
+++ b/tools/pd-simulator/simulator/raft.go
@@ -18,9 +18,9 @@ import (
 	"sync"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/cases"
-	"github.com/pingcap/pd/tools/pd-simulator/simulator/simutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/cases"
+	"github.com/pingcap/pd/v3/tools/pd-simulator/simulator/simutil"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 )
diff --git a/tools/pd-simulator/simulator/simutil/key.go b/tools/pd-simulator/simulator/simutil/key.go
index f7acf8136..177f5a26e 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/pingcap/pd/pkg/codec"
+	"github.com/pingcap/pd/v3/pkg/codec"
 	"github.com/pkg/errors"
 )
 
diff --git a/tools/pd-simulator/simulator/task.go b/tools/pd-simulator/simulator/task.go
index 0cdd759d4..f9626a49c 100644
--- a/tools/pd-simulator/simulator/task.go
+++ b/tools/pd-simulator/simulator/task.go
@@ -20,8 +20,8 @@ import (
 	"github.com/pingcap/kvproto/pkg/eraftpb"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tools/pd-analysis/analysis"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tools/pd-analysis/analysis"
 )
 
 // Task running in node.
diff --git a/tools/pd-tso-bench/main.go b/tools/pd-tso-bench/main.go
index 1c9b96923..f0dcd90c3 100644
--- a/tools/pd-tso-bench/main.go
+++ b/tools/pd-tso-bench/main.go
@@ -24,7 +24,7 @@ import (
 	"time"
 
 	"github.com/pingcap/log"
-	pd "github.com/pingcap/pd/client"
+	pd "github.com/pingcap/pd/v3/client"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
 )
diff --git a/tools/regions-dump/main.go b/tools/regions-dump/main.go
index 331ef574a..f6670fc61 100644
--- a/tools/regions-dump/main.go
+++ b/tools/regions-dump/main.go
@@ -12,8 +12,8 @@ import (
 	"time"
 
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/etcdutil"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/pkg/etcdutil"
+	"github.com/pingcap/pd/v3/server/core"
 	"github.com/pkg/errors"
 	"go.etcd.io/etcd/clientv3"
 	"go.etcd.io/etcd/pkg/transport"


Test patch:
diff --git a/client/client_test.go b/client/client_test.go
index b45a22328..feb446422 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -20,7 +20,7 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/testutil"
+	"github.com/pingcap/pd/v3/pkg/testutil"
 	"go.uber.org/goleak"
 	"google.golang.org/grpc"
 )
diff --git a/pkg/etcdutil/etcdutil_test.go b/pkg/etcdutil/etcdutil_test.go
index fbc97ce61..a896510cf 100644
--- a/pkg/etcdutil/etcdutil_test.go
+++ b/pkg/etcdutil/etcdutil_test.go
@@ -23,7 +23,7 @@ import (
 	"testing"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/pkg/tempurl"
+	"github.com/pingcap/pd/v3/pkg/tempurl"
 	"go.etcd.io/etcd/clientv3"
 	"go.etcd.io/etcd/embed"
 	"go.etcd.io/etcd/pkg/types"
diff --git a/pkg/metricutil/metricutil_test.go b/pkg/metricutil/metricutil_test.go
index d9caa33a4..3256f6995 100644
--- a/pkg/metricutil/metricutil_test.go
+++ b/pkg/metricutil/metricutil_test.go
@@ -18,7 +18,7 @@ import (
 	"time"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/pkg/typeutil"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
 )
 
 func Test(t *testing.T) {
diff --git a/pkg/slice/slice_test.go b/pkg/slice/slice_test.go
index d450b1925..208a8644b 100644
--- a/pkg/slice/slice_test.go
+++ b/pkg/slice/slice_test.go
@@ -17,7 +17,7 @@ import (
 	"testing"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/pkg/slice"
+	"github.com/pingcap/pd/v3/pkg/slice"
 )
 
 func Test(t *testing.T) {
diff --git a/pkg/testutil/operator_check.go b/pkg/testutil/operator_check.go
index 31e43adf0..58e82af65 100644
--- a/pkg/testutil/operator_check.go
+++ b/pkg/testutil/operator_check.go
@@ -15,7 +15,7 @@ package testutil
 
 import (
 	check "github.com/pingcap/check"
-	"github.com/pingcap/pd/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
 )
 
 // CheckAddPeer checks if the operator is to add peer on specified store.
diff --git a/server/api/admin_test.go b/server/api/admin_test.go
index a6a8fbc4e..9e79791a4 100644
--- a/server/api/admin_test.go
+++ b/server/api/admin_test.go
@@ -22,8 +22,8 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 var _ = Suite(&testAdminSuite{})
diff --git a/server/api/cluster_test.go b/server/api/cluster_test.go
index 3d4ad2886..9f2e680b4 100644
--- a/server/api/cluster_test.go
+++ b/server/api/cluster_test.go
@@ -19,9 +19,9 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/server/config"
 )
 
 var _ = Suite(&testClusterSuite{})
diff --git a/server/api/config_test.go b/server/api/config_test.go
index fd1761b4b..c516ec3a0 100644
--- a/server/api/config_test.go
+++ b/server/api/config_test.go
@@ -19,8 +19,8 @@ import (
 	"time"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
 )
 
 var _ = Suite(&testConfigSuite{})
diff --git a/server/api/diagnose_test.go b/server/api/diagnose_test.go
index f8cd1211e..9dca874b0 100644
--- a/server/api/diagnose_test.go
+++ b/server/api/diagnose_test.go
@@ -18,7 +18,7 @@ import (
 	"io/ioutil"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/server"
 )
 
 var _ = Suite(&testDiagnoseAPISuite{})
diff --git a/server/api/health_test.go b/server/api/health_test.go
index 27f6b4e55..ab365ab24 100644
--- a/server/api/health_test.go
+++ b/server/api/health_test.go
@@ -19,8 +19,8 @@ import (
 	"strings"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
 )
 
 var _ = Suite(&testHealthAPISuite{})
diff --git a/server/api/hot_status_test.go b/server/api/hot_status_test.go
index 792637c15..eb6dfdb05 100644
--- a/server/api/hot_status_test.go
+++ b/server/api/hot_status_test.go
@@ -17,8 +17,8 @@ import (
 	"fmt"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/server"
-	_ "github.com/pingcap/pd/server/schedulers"
+	"github.com/pingcap/pd/v3/server"
+	_ "github.com/pingcap/pd/v3/server/schedulers"
 )
 
 var _ = Suite(&testHotStatusSuite{})
diff --git a/server/api/label_test.go b/server/api/label_test.go
index 7f8ff2dec..f44e2a7eb 100644
--- a/server/api/label_test.go
+++ b/server/api/label_test.go
@@ -21,8 +21,8 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
 )
 
 var _ = Suite(&testLabelsStoreSuite{})
diff --git a/server/api/member_test.go b/server/api/member_test.go
index 4f625ec7d..353a12de0 100644
--- a/server/api/member_test.go
+++ b/server/api/member_test.go
@@ -22,8 +22,8 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
 )
 
 var _ = Suite(&testMemberAPISuite{})
diff --git a/server/api/operator_test.go b/server/api/operator_test.go
index 3fc1bf9e6..2cc883b2e 100644
--- a/server/api/operator_test.go
+++ b/server/api/operator_test.go
@@ -23,10 +23,10 @@ import (
 	"github.com/pingcap/failpoint"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 var _ = Suite(&testOperatorSuite{})
@@ -38,7 +38,7 @@ type testOperatorSuite struct {
 }
 
 func (s *testOperatorSuite) SetUpSuite(c *C) {
-	c.Assert(failpoint.Enable("github.com/pingcap/pd/server/schedule/unexpectedOperator", "return(true)"), IsNil)
+	c.Assert(failpoint.Enable("github.com/pingcap/pd/v3/server/schedule/unexpectedOperator", "return(true)"), IsNil)
 	s.svr, s.cleanup = mustNewServer(c, func(cfg *config.Config) { cfg.Replication.MaxReplicas = 1 })
 	mustWaitLeader(c, []*server.Server{s.svr})
 
diff --git a/server/api/region_test.go b/server/api/region_test.go
index e7690513b..4579d0fd5 100644
--- a/server/api/region_test.go
+++ b/server/api/region_test.go
@@ -24,8 +24,8 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 var _ = Suite(&testRegionSuite{})
diff --git a/server/api/scheduler_test.go b/server/api/scheduler_test.go
index 7fcaa8288..ca569ff2c 100644
--- a/server/api/scheduler_test.go
+++ b/server/api/scheduler_test.go
@@ -20,8 +20,8 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server"
-	_ "github.com/pingcap/pd/server/schedulers"
+	"github.com/pingcap/pd/v3/server"
+	_ "github.com/pingcap/pd/v3/server/schedulers"
 )
 
 var _ = Suite(&testScheduleSuite{})
diff --git a/server/api/server_test.go b/server/api/server_test.go
index 53740ac65..9ada773f8 100644
--- a/server/api/server_test.go
+++ b/server/api/server_test.go
@@ -22,9 +22,9 @@ import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
 	"go.uber.org/goleak"
 )
 
diff --git a/server/api/stats_test.go b/server/api/stats_test.go
index 4629c8dc0..b5f8e2128 100644
--- a/server/api/stats_test.go
+++ b/server/api/stats_test.go
@@ -19,10 +19,10 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/apiutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/statistics"
+	"github.com/pingcap/pd/v3/pkg/apiutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/statistics"
 )
 
 var _ = Suite(&testStatsSuite{})
diff --git a/server/api/status_test.go b/server/api/status_test.go
index 2fbbd5356..a7da0d776 100644
--- a/server/api/status_test.go
+++ b/server/api/status_test.go
@@ -18,7 +18,7 @@ import (
 	"io/ioutil"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/server"
 )
 
 var _ = Suite(&testStatusAPISuite{})
diff --git a/server/api/store_test.go b/server/api/store_test.go
index 15135115f..6a5aac211 100644
--- a/server/api/store_test.go
+++ b/server/api/store_test.go
@@ -27,8 +27,8 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 var _ = Suite(&testStoreSuite{})
diff --git a/server/api/trend_test.go b/server/api/trend_test.go
index 1f360a33d..fb3d2e4bd 100644
--- a/server/api/trend_test.go
+++ b/server/api/trend_test.go
@@ -19,10 +19,10 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
 )
 
 var _ = Suite(&testTrendSuite{})
diff --git a/server/api/util_test.go b/server/api/util_test.go
index 4e3043732..346d6cdde 100644
--- a/server/api/util_test.go
+++ b/server/api/util_test.go
@@ -19,7 +19,7 @@ import (
 	"net/http/httptest"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/pkg/apiutil"
+	"github.com/pingcap/pd/v3/pkg/apiutil"
 	"github.com/unrolled/render"
 )
 
diff --git a/server/api/version_test.go b/server/api/version_test.go
index a8e401917..01692bd6f 100644
--- a/server/api/version_test.go
+++ b/server/api/version_test.go
@@ -23,9 +23,9 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/failpoint"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
 )
 
 var _ = Suite(&testVersionSuite{})
@@ -59,7 +59,7 @@ func (s *testVersionSuite) TestGetVersion(c *C) {
 	go func(cfg *config.Config) {
 		s, err := server.CreateServer(ctx, cfg, NewHandler)
 		c.Assert(err, IsNil)
-		c.Assert(failpoint.Enable("github.com/pingcap/pd/server/memberNil", `return(true)`), IsNil)
+		c.Assert(failpoint.Enable("github.com/pingcap/pd/v3/server/memberNil", `return(true)`), IsNil)
 		reqCh <- struct{}{}
 		err = s.Run()
 		c.Assert(err, IsNil)
@@ -80,5 +80,5 @@ func (s *testVersionSuite) TestGetVersion(c *C) {
 		cancel()
 		testutil.CleanServer(cfg.DataDir)
 	}()
-	c.Assert(failpoint.Disable("github.com/pingcap/pd/server/memberNil"), IsNil)
+	c.Assert(failpoint.Disable("github.com/pingcap/pd/v3/server/memberNil"), IsNil)
 }
diff --git a/server/cluster/cluster_test.go b/server/cluster/cluster_test.go
index 882d0c788..5777a4c07 100644
--- a/server/cluster/cluster_test.go
+++ b/server/cluster/cluster_test.go
@@ -21,12 +21,12 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/mock/mockid"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/id"
-	"github.com/pingcap/pd/server/kv"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/pkg/mock/mockid"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/id"
+	"github.com/pingcap/pd/v3/server/kv"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 )
 
 func Test(t *testing.T) {
diff --git a/server/cluster/cluster_worker_test.go b/server/cluster/cluster_worker_test.go
index 93365000f..5f09b9c86 100644
--- a/server/cluster/cluster_worker_test.go
+++ b/server/cluster/cluster_worker_test.go
@@ -19,7 +19,7 @@ import (
 	"github.com/pingcap/kvproto/pkg/pdpb"
 
 	// Register schedulers
-	_ "github.com/pingcap/pd/server/schedulers"
+	_ "github.com/pingcap/pd/v3/server/schedulers"
 )
 
 var _ = Suite(&testClusterWorkerSuite{})
diff --git a/server/cluster/coordinator_test.go b/server/cluster/coordinator_test.go
index 6c7ba4a35..ee0308ea1 100644
--- a/server/cluster/coordinator_test.go
+++ b/server/cluster/coordinator_test.go
@@ -25,16 +25,16 @@ import (
 	"github.com/pingcap/kvproto/pkg/eraftpb"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/mock/mockhbstream"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/kv"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedulers"
-	"github.com/pingcap/pd/server/statistics"
+	"github.com/pingcap/pd/v3/pkg/mock/mockhbstream"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/kv"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedulers"
+	"github.com/pingcap/pd/v3/server/statistics"
 )
 
 func newTestOperator(regionID uint64, regionEpoch *metapb.RegionEpoch, kind operator.OpKind, steps ...operator.OpStep) *operator.Operator {
@@ -146,7 +146,7 @@ type testCoordinatorSuite struct {
 
 func (s *testCoordinatorSuite) SetUpSuite(c *C) {
 	s.ctx, s.cancel = context.WithCancel(context.Background())
-	c.Assert(failpoint.Enable("github.com/pingcap/pd/server/schedule/unexpectedOperator", "return(true)"), IsNil)
+	c.Assert(failpoint.Enable("github.com/pingcap/pd/v3/server/schedule/unexpectedOperator", "return(true)"), IsNil)
 }
 
 func (s *testCoordinatorSuite) TearDownSuite(c *C) {
@@ -863,7 +863,7 @@ type testOperatorControllerSuite struct {
 
 func (s *testOperatorControllerSuite) SetUpSuite(c *C) {
 	s.ctx, s.cancel = context.WithCancel(context.Background())
-	c.Assert(failpoint.Enable("github.com/pingcap/pd/server/schedule/unexpectedOperator", "return(true)"), IsNil)
+	c.Assert(failpoint.Enable("github.com/pingcap/pd/v3/server/schedule/unexpectedOperator", "return(true)"), IsNil)
 }
 
 func (s *testOperatorControllerSuite) TearDownSuite(c *C) {
@@ -988,7 +988,7 @@ type testScheduleControllerSuite struct {
 
 func (s *testScheduleControllerSuite) SetUpSuite(c *C) {
 	s.ctx, s.cancel = context.WithCancel(context.Background())
-	c.Assert(failpoint.Enable("github.com/pingcap/pd/server/schedule/unexpectedOperator", "return(true)"), IsNil)
+	c.Assert(failpoint.Enable("github.com/pingcap/pd/v3/server/schedule/unexpectedOperator", "return(true)"), IsNil)
 }
 
 func (s *testScheduleControllerSuite) TearDownSuite(c *C) {
diff --git a/server/cluster/store_limiter_test.go b/server/cluster/store_limiter_test.go
index 5bec406cb..fd47a18ed 100644
--- a/server/cluster/store_limiter_test.go
+++ b/server/cluster/store_limiter_test.go
@@ -18,9 +18,9 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/mock/mockcluster"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/server/schedule"
+	"github.com/pingcap/pd/v3/pkg/mock/mockcluster"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/server/schedule"
 )
 
 var _ = Suite(&testStoreLimiterSuite{})
diff --git a/server/config/config_test.go b/server/config/config_test.go
index 7b8301de1..cbca49575 100644
--- a/server/config/config_test.go
+++ b/server/config/config_test.go
@@ -24,11 +24,11 @@ import (
 
 	"github.com/BurntSushi/toml"
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/kv"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/kv"
 
 	// Register schedulers.
-	_ "github.com/pingcap/pd/server/schedulers"
+	_ "github.com/pingcap/pd/v3/server/schedulers"
 )
 
 func Test(t *testing.T) {
diff --git a/server/config_manager/config_manager_test.go b/server/config_manager/config_manager_test.go
index 87315f985..d9cb6c0bd 100644
--- a/server/config_manager/config_manager_test.go
+++ b/server/config_manager/config_manager_test.go
@@ -19,8 +19,8 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/configpb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/kv"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/kv"
 )
 
 func Test(t *testing.T) {
diff --git a/server/core/region_test.go b/server/core/region_test.go
index d38cc73a0..4911dcb2c 100644
--- a/server/core/region_test.go
+++ b/server/core/region_test.go
@@ -22,8 +22,8 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/mock/mockid"
-	"github.com/pingcap/pd/server/id"
+	"github.com/pingcap/pd/v3/pkg/mock/mockid"
+	"github.com/pingcap/pd/v3/server/id"
 )
 
 func TestCore(t *testing.T) {
diff --git a/server/core/storage_test.go b/server/core/storage_test.go
index f6f89b396..a59ac08b1 100644
--- a/server/core/storage_test.go
+++ b/server/core/storage_test.go
@@ -19,7 +19,7 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/kv"
+	"github.com/pingcap/pd/v3/server/kv"
 	"github.com/pkg/errors"
 )
 
diff --git a/server/heartbeat_stream_test.go b/server/heartbeat_stream_test.go
index e336b30b3..5693b71ab 100644
--- a/server/heartbeat_stream_test.go
+++ b/server/heartbeat_stream_test.go
@@ -21,9 +21,9 @@ import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/pkg/typeutil"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
+	"github.com/pingcap/pd/v3/server/core"
 	"go.uber.org/zap"
 )
 
diff --git a/server/join/join_test.go b/server/join/join_test.go
index 418e62769..5abea5744 100644
--- a/server/join/join_test.go
+++ b/server/join/join_test.go
@@ -17,8 +17,8 @@ import (
 	"testing"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
 )
 
 func TestJoin(t *testing.T) {
diff --git a/server/kv/etcd_kv_test.go b/server/kv/etcd_kv_test.go
index ad47c3412..2054615b4 100644
--- a/server/kv/etcd_kv_test.go
+++ b/server/kv/etcd_kv_test.go
@@ -23,7 +23,7 @@ import (
 	"testing"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/pkg/tempurl"
+	"github.com/pingcap/pd/v3/pkg/tempurl"
 	"go.etcd.io/etcd/clientv3"
 	"go.etcd.io/etcd/embed"
 )
diff --git a/server/region_syncer/history_buffer_test.go b/server/region_syncer/history_buffer_test.go
index e8d247ffd..b444937e1 100644
--- a/server/region_syncer/history_buffer_test.go
+++ b/server/region_syncer/history_buffer_test.go
@@ -18,8 +18,8 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/kv"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/kv"
 )
 
 var _ = Suite(&testHistoryBuffer{})
diff --git a/server/schedule/checker/merge_checker_test.go b/server/schedule/checker/merge_checker_test.go
index 6b8c3bdb4..49da35df3 100644
--- a/server/schedule/checker/merge_checker_test.go
+++ b/server/schedule/checker/merge_checker_test.go
@@ -21,13 +21,13 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/mock/mockcluster"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/schedule/placement"
+	"github.com/pingcap/pd/v3/pkg/mock/mockcluster"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/schedule/placement"
 	"go.uber.org/goleak"
 )
 
diff --git a/server/schedule/checker/replica_checker_test.go b/server/schedule/checker/replica_checker_test.go
index 119a033a3..340f63836 100644
--- a/server/schedule/checker/replica_checker_test.go
+++ b/server/schedule/checker/replica_checker_test.go
@@ -19,11 +19,11 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/mock/mockcluster"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/pkg/mock/mockcluster"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 )
 
 var _ = Suite(&testReplicaCheckerSuite{})
diff --git a/server/schedule/checker/rule_checker_test.go b/server/schedule/checker/rule_checker_test.go
index f794f30e9..48c1fc243 100644
--- a/server/schedule/checker/rule_checker_test.go
+++ b/server/schedule/checker/rule_checker_test.go
@@ -18,11 +18,11 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/mock/mockcluster"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/placement"
+	"github.com/pingcap/pd/v3/pkg/mock/mockcluster"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/placement"
 )
 
 var _ = Suite(&testRuleCheckerSuite{})
diff --git a/server/schedule/filter/filters_test.go b/server/schedule/filter/filters_test.go
index 8f374294e..9402db70b 100644
--- a/server/schedule/filter/filters_test.go
+++ b/server/schedule/filter/filters_test.go
@@ -17,10 +17,10 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/mock/mockcluster"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/placement"
+	"github.com/pingcap/pd/v3/pkg/mock/mockcluster"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/placement"
 )
 
 func Test(t *testing.T) {
diff --git a/server/schedule/operator/builder_test.go b/server/schedule/operator/builder_test.go
index 027f7919c..557cfd360 100644
--- a/server/schedule/operator/builder_test.go
+++ b/server/schedule/operator/builder_test.go
@@ -16,10 +16,10 @@ package operator
 import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/mock/mockcluster"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/pkg/mock/mockcluster"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 )
 
 var _ = Suite(&testBuilderSuite{})
diff --git a/server/schedule/operator/operator_test.go b/server/schedule/operator/operator_test.go
index 9ee151ebb..0c88956dd 100644
--- a/server/schedule/operator/operator_test.go
+++ b/server/schedule/operator/operator_test.go
@@ -21,10 +21,10 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/mock/mockcluster"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/opt"
+	"github.com/pingcap/pd/v3/pkg/mock/mockcluster"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
 )
 
 func Test(t *testing.T) {
diff --git a/server/schedule/operator_controller_test.go b/server/schedule/operator_controller_test.go
index b1e543f64..9677c7e1f 100644
--- a/server/schedule/operator_controller_test.go
+++ b/server/schedule/operator_controller_test.go
@@ -25,12 +25,12 @@ import (
 	"github.com/pingcap/failpoint"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/mock/mockcluster"
-	"github.com/pingcap/pd/pkg/mock/mockhbstream"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/checker"
-	"github.com/pingcap/pd/server/schedule/operator"
+	"github.com/pingcap/pd/v3/pkg/mock/mockcluster"
+	"github.com/pingcap/pd/v3/pkg/mock/mockhbstream"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/checker"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
 )
 
 func Test(t *testing.T) {
@@ -46,7 +46,7 @@ type testOperatorControllerSuite struct {
 
 func (t *testOperatorControllerSuite) SetUpSuite(c *C) {
 	t.ctx, t.cancel = context.WithCancel(context.Background())
-	c.Assert(failpoint.Enable("github.com/pingcap/pd/server/schedule/unexpectedOperator", "return(true)"), IsNil)
+	c.Assert(failpoint.Enable("github.com/pingcap/pd/v3/server/schedule/unexpectedOperator", "return(true)"), IsNil)
 }
 
 func (t *testOperatorControllerSuite) TearDownSuite(c *C) {
@@ -130,7 +130,7 @@ func (t *testOperatorControllerSuite) TestOperatorStatus(c *C) {
 }
 
 func (t *testOperatorControllerSuite) TestCheckAddUnexpectedStatus(c *C) {
-	c.Assert(failpoint.Disable("github.com/pingcap/pd/server/schedule/unexpectedOperator"), IsNil)
+	c.Assert(failpoint.Disable("github.com/pingcap/pd/v3/server/schedule/unexpectedOperator"), IsNil)
 	opt := mockoption.NewScheduleOptions()
 	tc := mockcluster.NewCluster(opt)
 	oc := NewOperatorController(t.ctx, tc, mockhbstream.NewHeartbeatStream())
@@ -213,7 +213,7 @@ func (t *testOperatorControllerSuite) TestConcurrentRemoveOperator(c *C) {
 	c.Assert(op1.Start(), IsTrue)
 	oc.SetOperator(op1)
 
-	c.Assert(failpoint.Enable("github.com/pingcap/pd/server/schedule/concurrentRemoveOperator", "return(true)"), IsNil)
+	c.Assert(failpoint.Enable("github.com/pingcap/pd/v3/server/schedule/concurrentRemoveOperator", "return(true)"), IsNil)
 
 	var wg sync.WaitGroup
 	wg.Add(2)
diff --git a/server/schedule/opt/healthy_test.go b/server/schedule/opt/healthy_test.go
index c6de89049..224efd091 100644
--- a/server/schedule/opt/healthy_test.go
+++ b/server/schedule/opt/healthy_test.go
@@ -19,9 +19,9 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/mock/mockcluster"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/pkg/mock/mockcluster"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 func TestOpt(t *testing.T) {
diff --git a/server/schedule/placement/fit_test.go b/server/schedule/placement/fit_test.go
index d45255f33..d222f5831 100644
--- a/server/schedule/placement/fit_test.go
+++ b/server/schedule/placement/fit_test.go
@@ -20,7 +20,7 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 var _ = Suite(&testFitSuite{})
diff --git a/server/schedule/placement/label_constraint_test.go b/server/schedule/placement/label_constraint_test.go
index d14115c66..773c48035 100644
--- a/server/schedule/placement/label_constraint_test.go
+++ b/server/schedule/placement/label_constraint_test.go
@@ -17,7 +17,7 @@ import (
 	"testing"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 func TestPlacement(t *testing.T) {
diff --git a/server/schedule/placement/rule_manager_test.go b/server/schedule/placement/rule_manager_test.go
index 7875ab52d..2b22f0b4f 100644
--- a/server/schedule/placement/rule_manager_test.go
+++ b/server/schedule/placement/rule_manager_test.go
@@ -18,8 +18,8 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/kv"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/kv"
 )
 
 var _ = Suite(&testManagerSuite{})
diff --git a/server/schedule/selector/selector_test.go b/server/schedule/selector/selector_test.go
index 985966c12..a0a5f699b 100644
--- a/server/schedule/selector/selector_test.go
+++ b/server/schedule/selector/selector_test.go
@@ -17,10 +17,10 @@ import (
 	"testing"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/pkg/mock/mockcluster"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/filter"
+	"github.com/pingcap/pd/v3/pkg/mock/mockcluster"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/filter"
 )
 
 func Test(t *testing.T) {
diff --git a/server/schedule/test_util.go b/server/schedule/test_util.go
index a4ffcab34..51b2f775a 100644
--- a/server/schedule/test_util.go
+++ b/server/schedule/test_util.go
@@ -15,9 +15,9 @@ package schedule
 
 import (
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/mock/mockcluster"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/operator"
+	"github.com/pingcap/pd/v3/pkg/mock/mockcluster"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
 )
 
 // ApplyOperatorStep applies operator step. Only for test purpose.
diff --git a/server/schedule/waiting_operator_test.go b/server/schedule/waiting_operator_test.go
index d437fb8ba..a71196427 100644
--- a/server/schedule/waiting_operator_test.go
+++ b/server/schedule/waiting_operator_test.go
@@ -16,8 +16,8 @@ package schedule
 import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
 )
 
 var _ = Suite(&testWaitingOperatorSuite{})
diff --git a/server/schedulers/balance_test.go b/server/schedulers/balance_test.go
index ef36f4462..e1c96f4f7 100644
--- a/server/schedulers/balance_test.go
+++ b/server/schedulers/balance_test.go
@@ -22,15 +22,15 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/mock/mockcluster"
-	"github.com/pingcap/pd/pkg/mock/mockhbstream"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/kv"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/checker"
-	"github.com/pingcap/pd/server/schedule/operator"
+	"github.com/pingcap/pd/v3/pkg/mock/mockcluster"
+	"github.com/pingcap/pd/v3/pkg/mock/mockhbstream"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/kv"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/checker"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
 )
 
 func newTestReplication(mso *mockoption.ScheduleOptions, maxReplicas int, locationLabels ...string) {
diff --git a/server/schedulers/hot_test.go b/server/schedulers/hot_test.go
index b0aeeca1c..bbe55da14 100644
--- a/server/schedulers/hot_test.go
+++ b/server/schedulers/hot_test.go
@@ -19,14 +19,14 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/mock/mockcluster"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/kv"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/statistics"
+	"github.com/pingcap/pd/v3/pkg/mock/mockcluster"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/kv"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/statistics"
 )
 
 var _ = Suite(&testHotWriteRegionSchedulerSuite{})
diff --git a/server/schedulers/scheduler_test.go b/server/schedulers/scheduler_test.go
index 3998229b1..437a825a7 100644
--- a/server/schedulers/scheduler_test.go
+++ b/server/schedulers/scheduler_test.go
@@ -18,16 +18,16 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/mock/mockcluster"
-	"github.com/pingcap/pd/pkg/mock/mockhbstream"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/kv"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/server/schedule/operator"
-	"github.com/pingcap/pd/server/schedule/opt"
-	"github.com/pingcap/pd/server/statistics"
+	"github.com/pingcap/pd/v3/pkg/mock/mockcluster"
+	"github.com/pingcap/pd/v3/pkg/mock/mockhbstream"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/kv"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/server/schedule/operator"
+	"github.com/pingcap/pd/v3/server/schedule/opt"
+	"github.com/pingcap/pd/v3/server/statistics"
 )
 
 var _ = Suite(&testShuffleLeaderSuite{})
diff --git a/server/server_test.go b/server/server_test.go
index f7a028414..04aafc4f3 100644
--- a/server/server_test.go
+++ b/server/server_test.go
@@ -21,9 +21,9 @@ import (
 	"testing"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/pkg/etcdutil"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/pkg/etcdutil"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server/config"
 	"go.etcd.io/etcd/embed"
 	"go.etcd.io/etcd/pkg/types"
 	"go.uber.org/goleak"
diff --git a/server/statistics/hot_peer_cache_test.go b/server/statistics/hot_peer_cache_test.go
index 62b59fc5c..62b28e1e3 100644
--- a/server/statistics/hot_peer_cache_test.go
+++ b/server/statistics/hot_peer_cache_test.go
@@ -16,7 +16,7 @@ package statistics
 import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 var _ = Suite(&testHotPeerCache{})
diff --git a/server/statistics/region_collection_test.go b/server/statistics/region_collection_test.go
index 602c3d586..cdf7ad1af 100644
--- a/server/statistics/region_collection_test.go
+++ b/server/statistics/region_collection_test.go
@@ -17,8 +17,8 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 var _ = Suite(&testRegionStatisticsSuite{})
diff --git a/server/statistics/store_collection_test.go b/server/statistics/store_collection_test.go
index eb1190c83..5da8fb45a 100644
--- a/server/statistics/store_collection_test.go
+++ b/server/statistics/store_collection_test.go
@@ -18,8 +18,8 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/mock/mockoption"
-	"github.com/pingcap/pd/server/core"
+	"github.com/pingcap/pd/v3/pkg/mock/mockoption"
+	"github.com/pingcap/pd/v3/server/core"
 )
 
 var _ = Suite(&testStoreStatisticsSuite{})
diff --git a/server/testutil.go b/server/testutil.go
index c9432e131..9294d4ec9 100644
--- a/server/testutil.go
+++ b/server/testutil.go
@@ -23,14 +23,14 @@ import (
 
 	"github.com/pingcap/check"
 	"github.com/pingcap/log"
-	"github.com/pingcap/pd/pkg/tempurl"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/pkg/typeutil"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/pkg/tempurl"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
+	"github.com/pingcap/pd/v3/server/config"
 	"go.etcd.io/etcd/embed"
 
 	// Register schedulers
-	_ "github.com/pingcap/pd/server/schedulers"
+	_ "github.com/pingcap/pd/v3/server/schedulers"
 )
 
 // CleanupFunc closes test pd server(s) and deletes any files left behind.
diff --git a/tests/client/client_test.go b/tests/client/client_test.go
index 613281132..5d92776c5 100644
--- a/tests/client/client_test.go
+++ b/tests/client/client_test.go
@@ -27,12 +27,12 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	pd "github.com/pingcap/pd/client"
-	"github.com/pingcap/pd/pkg/mock/mockid"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tests"
+	pd "github.com/pingcap/pd/v3/client"
+	"github.com/pingcap/pd/v3/pkg/mock/mockid"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tests"
 	"go.etcd.io/etcd/clientv3"
 	"go.uber.org/goleak"
 )
diff --git a/tests/cluster.go b/tests/cluster.go
index 41473b829..da63b2d7d 100644
--- a/tests/cluster.go
+++ b/tests/cluster.go
@@ -23,15 +23,15 @@ import (
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
 	"github.com/pingcap/log"
-	dashboardapi "github.com/pingcap/pd/pkg/dashboard/apiserver"
-	dashboardui "github.com/pingcap/pd/pkg/dashboard/uiserver"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/api"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/id"
-	"github.com/pingcap/pd/server/join"
+	dashboardapi "github.com/pingcap/pd/v3/pkg/dashboard/apiserver"
+	dashboardui "github.com/pingcap/pd/v3/pkg/dashboard/uiserver"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/api"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/id"
+	"github.com/pingcap/pd/v3/server/join"
 	"github.com/pkg/errors"
 	"go.etcd.io/etcd/clientv3"
 	"go.uber.org/zap"
diff --git a/tests/compatibility/version_upgrade_test.go b/tests/compatibility/version_upgrade_test.go
index c1f7b466b..aa7649a2b 100644
--- a/tests/compatibility/version_upgrade_test.go
+++ b/tests/compatibility/version_upgrade_test.go
@@ -21,8 +21,8 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/tests"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/tests"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/config.go b/tests/config.go
index d283f0a09..72db25d63 100644
--- a/tests/config.go
+++ b/tests/config.go
@@ -18,8 +18,8 @@ import (
 	"io/ioutil"
 	"strings"
 
-	"github.com/pingcap/pd/pkg/tempurl"
-	"github.com/pingcap/pd/server/config"
+	"github.com/pingcap/pd/v3/pkg/tempurl"
+	"github.com/pingcap/pd/v3/server/config"
 )
 
 type serverConfig struct {
diff --git a/tests/dashboard/service_test.go b/tests/dashboard/service_test.go
index 70072514d..9ec62061c 100644
--- a/tests/dashboard/service_test.go
+++ b/tests/dashboard/service_test.go
@@ -21,14 +21,14 @@ import (
 	"testing"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/tests"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/tests"
 	"go.uber.org/goleak"
 
 	// Register schedulers.
-	_ "github.com/pingcap/pd/server/schedulers"
+	_ "github.com/pingcap/pd/v3/server/schedulers"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/pdbackup/backup_test.go b/tests/pdbackup/backup_test.go
index 91ef019e6..e09b86e90 100644
--- a/tests/pdbackup/backup_test.go
+++ b/tests/pdbackup/backup_test.go
@@ -22,9 +22,9 @@ import (
 	"time"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/tests"
-	"github.com/pingcap/pd/tools/pd-backup/pdbackup"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/tests"
+	"github.com/pingcap/pd/v3/tools/pd-backup/pdbackup"
 	"go.etcd.io/etcd/clientv3"
 )
 
diff --git a/tests/pdctl/cluster/cluster_test.go b/tests/pdctl/cluster/cluster_test.go
index 8ddab388f..10b37dd95 100644
--- a/tests/pdctl/cluster/cluster_test.go
+++ b/tests/pdctl/cluster/cluster_test.go
@@ -21,9 +21,9 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/tests"
-	"github.com/pingcap/pd/tests/pdctl"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/tests"
+	"github.com/pingcap/pd/v3/tests/pdctl"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/pdctl/config/config_test.go b/tests/pdctl/config/config_test.go
index 72e388556..c9355497c 100644
--- a/tests/pdctl/config/config_test.go
+++ b/tests/pdctl/config/config_test.go
@@ -23,10 +23,10 @@ import (
 	"github.com/coreos/go-semver/semver"
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/tests"
-	"github.com/pingcap/pd/tests/pdctl"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/tests"
+	"github.com/pingcap/pd/v3/tests/pdctl"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/pdctl/health/health_test.go b/tests/pdctl/health/health_test.go
index b05d3714b..961d8492f 100644
--- a/tests/pdctl/health/health_test.go
+++ b/tests/pdctl/health/health_test.go
@@ -19,11 +19,11 @@ import (
 	"testing"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/api"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/tests"
-	"github.com/pingcap/pd/tests/pdctl"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/api"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/tests"
+	"github.com/pingcap/pd/v3/tests/pdctl"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/pdctl/helper.go b/tests/pdctl/helper.go
index 143283559..7e91be6fc 100644
--- a/tests/pdctl/helper.go
+++ b/tests/pdctl/helper.go
@@ -25,14 +25,14 @@ import (
 	"github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/api"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tests"
-	"github.com/pingcap/pd/tools/pd-ctl/pdctl"
-	ctl "github.com/pingcap/pd/tools/pd-ctl/pdctl"
-	"github.com/pingcap/pd/tools/pd-ctl/pdctl/command"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/api"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tests"
+	"github.com/pingcap/pd/v3/tools/pd-ctl/pdctl"
+	ctl "github.com/pingcap/pd/v3/tools/pd-ctl/pdctl"
+	"github.com/pingcap/pd/v3/tools/pd-ctl/pdctl/command"
 	"github.com/spf13/cobra"
 )
 
diff --git a/tests/pdctl/hot/hot_test.go b/tests/pdctl/hot/hot_test.go
index aaabdcf77..199243afd 100644
--- a/tests/pdctl/hot/hot_test.go
+++ b/tests/pdctl/hot/hot_test.go
@@ -23,12 +23,12 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/api"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/statistics"
-	"github.com/pingcap/pd/tests"
-	"github.com/pingcap/pd/tests/pdctl"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/api"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/statistics"
+	"github.com/pingcap/pd/v3/tests"
+	"github.com/pingcap/pd/v3/tests/pdctl"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/pdctl/label/label_test.go b/tests/pdctl/label/label_test.go
index 274eb1c4d..98957293f 100644
--- a/tests/pdctl/label/label_test.go
+++ b/tests/pdctl/label/label_test.go
@@ -21,11 +21,11 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/api"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/tests"
-	"github.com/pingcap/pd/tests/pdctl"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/api"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/tests"
+	"github.com/pingcap/pd/v3/tests/pdctl"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/pdctl/log/log_test.go b/tests/pdctl/log/log_test.go
index 7abad7a4c..2bc8a7cd9 100644
--- a/tests/pdctl/log/log_test.go
+++ b/tests/pdctl/log/log_test.go
@@ -19,9 +19,9 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/tests"
-	"github.com/pingcap/pd/tests/pdctl"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/tests"
+	"github.com/pingcap/pd/v3/tests/pdctl"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/pdctl/member/member_test.go b/tests/pdctl/member/member_test.go
index 8efa2201b..5948da3ed 100644
--- a/tests/pdctl/member/member_test.go
+++ b/tests/pdctl/member/member_test.go
@@ -21,11 +21,11 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/etcdutil"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/tests"
-	"github.com/pingcap/pd/tests/pdctl"
+	"github.com/pingcap/pd/v3/pkg/etcdutil"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/tests"
+	"github.com/pingcap/pd/v3/tests/pdctl"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/pdctl/operator/operator_test.go b/tests/pdctl/operator/operator_test.go
index 03e64b605..8810804d1 100644
--- a/tests/pdctl/operator/operator_test.go
+++ b/tests/pdctl/operator/operator_test.go
@@ -21,11 +21,11 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tests"
-	"github.com/pingcap/pd/tests/pdctl"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tests"
+	"github.com/pingcap/pd/v3/tests/pdctl"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/pdctl/region/region_test.go b/tests/pdctl/region/region_test.go
index 77481c08d..ce378ac90 100644
--- a/tests/pdctl/region/region_test.go
+++ b/tests/pdctl/region/region_test.go
@@ -22,11 +22,11 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/api"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tests"
-	"github.com/pingcap/pd/tests/pdctl"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/api"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tests"
+	"github.com/pingcap/pd/v3/tests/pdctl"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/pdctl/scheduler/scheduler_test.go b/tests/pdctl/scheduler/scheduler_test.go
index 51f3301f8..bdd10d467 100644
--- a/tests/pdctl/scheduler/scheduler_test.go
+++ b/tests/pdctl/scheduler/scheduler_test.go
@@ -22,9 +22,9 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/tests"
-	"github.com/pingcap/pd/tests/pdctl"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/tests"
+	"github.com/pingcap/pd/v3/tests/pdctl"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/pdctl/store/store_test.go b/tests/pdctl/store/store_test.go
index a351f5d1a..16bc767f0 100644
--- a/tests/pdctl/store/store_test.go
+++ b/tests/pdctl/store/store_test.go
@@ -21,11 +21,11 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/api"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/tests"
-	"github.com/pingcap/pd/tests/pdctl"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/api"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/tests"
+	"github.com/pingcap/pd/v3/tests/pdctl"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/pdctl/tso/tso_test.go b/tests/pdctl/tso/tso_test.go
index ad85a27a3..9150b38e8 100644
--- a/tests/pdctl/tso/tso_test.go
+++ b/tests/pdctl/tso/tso_test.go
@@ -20,8 +20,8 @@ import (
 	"time"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/tests/pdctl"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/tests/pdctl"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/server/api/api_test.go b/tests/server/api/api_test.go
index 2e17c4482..cceb3391e 100644
--- a/tests/server/api/api_test.go
+++ b/tests/server/api/api_test.go
@@ -21,12 +21,12 @@ import (
 	"time"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/pkg/apiutil/serverapi"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/pkg/typeutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/tests"
+	"github.com/pingcap/pd/v3/pkg/apiutil/serverapi"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/pkg/typeutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/tests"
 	"go.uber.org/goleak"
 )
 
diff --git a/tests/server/cluster/cluster_test.go b/tests/server/cluster/cluster_test.go
index 5613816ce..c240a875d 100644
--- a/tests/server/cluster/cluster_test.go
+++ b/tests/server/cluster/cluster_test.go
@@ -25,16 +25,16 @@ import (
 	"github.com/pingcap/failpoint"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/mock/mockid"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/cluster"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/server/kv"
-	syncer "github.com/pingcap/pd/server/region_syncer"
-	"github.com/pingcap/pd/server/schedule"
-	"github.com/pingcap/pd/tests"
+	"github.com/pingcap/pd/v3/pkg/mock/mockid"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/cluster"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/server/kv"
+	syncer "github.com/pingcap/pd/v3/server/region_syncer"
+	"github.com/pingcap/pd/v3/server/schedule"
+	"github.com/pingcap/pd/v3/tests"
 	"github.com/pkg/errors"
 )
 
@@ -347,7 +347,7 @@ func (s *clusterTestSuite) TestRaftClusterMultipleRestart(c *C) {
 	c.Assert(tc, NotNil)
 
 	// let the job run at small interval
-	c.Assert(failpoint.Enable("github.com/pingcap/pd/server/highFrequencyClusterJobs", `return(true)`), IsNil)
+	c.Assert(failpoint.Enable("github.com/pingcap/pd/v3/server/highFrequencyClusterJobs", `return(true)`), IsNil)
 	for i := 0; i < 100; i++ {
 		err = rc.Start(leaderServer.GetServer())
 		c.Assert(err, IsNil)
@@ -403,7 +403,7 @@ func (s *clusterTestSuite) TestStoreVersionChange(c *C) {
 	c.Assert(err, IsNil)
 	store := newMetaStore(storeID, "127.0.0.1:4", "2.1.0", metapb.StoreState_Up)
 	var wg sync.WaitGroup
-	c.Assert(failpoint.Enable("github.com/pingcap/pd/server/versionChangeConcurrency", `return(true)`), IsNil)
+	c.Assert(failpoint.Enable("github.com/pingcap/pd/v3/server/versionChangeConcurrency", `return(true)`), IsNil)
 	wg.Add(1)
 	go func() {
 		defer wg.Done()
@@ -416,7 +416,7 @@ func (s *clusterTestSuite) TestStoreVersionChange(c *C) {
 	v, err := semver.NewVersion("1.0.0")
 	c.Assert(err, IsNil)
 	c.Assert(svr.GetClusterVersion(), Equals, *v)
-	c.Assert(failpoint.Disable("github.com/pingcap/pd/server/versionChangeConcurrency"), IsNil)
+	c.Assert(failpoint.Disable("github.com/pingcap/pd/v3/server/versionChangeConcurrency"), IsNil)
 }
 
 func (s *clusterTestSuite) TestConcurrentHandleRegion(c *C) {
diff --git a/tests/server/cluster/cluster_work_test.go b/tests/server/cluster/cluster_work_test.go
index 1e61aaf29..2278b122b 100644
--- a/tests/server/cluster/cluster_work_test.go
+++ b/tests/server/cluster/cluster_work_test.go
@@ -20,10 +20,10 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tests"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tests"
 )
 
 var _ = Suite(&clusterWorkerTestSuite{})
diff --git a/tests/server/id/id_test.go b/tests/server/id/id_test.go
index 09ad7b31d..62df89ebe 100644
--- a/tests/server/id/id_test.go
+++ b/tests/server/id/id_test.go
@@ -20,9 +20,9 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/tests"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/tests"
 	"go.uber.org/goleak"
 )
 
diff --git a/tests/server/join/join_fail/join_fail_test.go b/tests/server/join/join_fail/join_fail_test.go
index a767bebdb..a7c7a9e5a 100644
--- a/tests/server/join/join_fail/join_fail_test.go
+++ b/tests/server/join/join_fail/join_fail_test.go
@@ -20,9 +20,9 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/failpoint"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/tests"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/tests"
 	"go.uber.org/goleak"
 )
 
@@ -54,9 +54,9 @@ func (s *joinTestSuite) TestFailedPDJoinInStep1(c *C) {
 	cluster.WaitLeader()
 
 	// Join the second PD.
-	c.Assert(failpoint.Enable("github.com/pingcap/pd/server/join/add-member-failed", `return`), IsNil)
+	c.Assert(failpoint.Enable("github.com/pingcap/pd/v3/server/join/add-member-failed", `return`), IsNil)
 	_, err = cluster.Join(ctx)
 	c.Assert(err, NotNil)
 	c.Assert(strings.Contains(err.Error(), "join failed"), IsTrue)
-	c.Assert(failpoint.Disable("github.com/pingcap/pd/server/join/add-member-failed"), IsNil)
+	c.Assert(failpoint.Disable("github.com/pingcap/pd/v3/server/join/add-member-failed"), IsNil)
 }
diff --git a/tests/server/join/join_test.go b/tests/server/join/join_test.go
index a859913da..9b28678a5 100644
--- a/tests/server/join/join_test.go
+++ b/tests/server/join/join_test.go
@@ -21,10 +21,10 @@ import (
 	"time"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/pkg/etcdutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/join"
-	"github.com/pingcap/pd/tests"
+	"github.com/pingcap/pd/v3/pkg/etcdutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/join"
+	"github.com/pingcap/pd/v3/tests"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/server/member/member_test.go b/tests/server/member/member_test.go
index 621ccdd91..b34613c05 100644
--- a/tests/server/member/member_test.go
+++ b/tests/server/member/member_test.go
@@ -26,10 +26,10 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/tests"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/tests"
 	"github.com/pkg/errors"
 	"go.uber.org/goleak"
 )
diff --git a/tests/server/region_syncer/region_syncer_test.go b/tests/server/region_syncer/region_syncer_test.go
index d480b6034..230f3b447 100644
--- a/tests/server/region_syncer/region_syncer_test.go
+++ b/tests/server/region_syncer/region_syncer_test.go
@@ -20,12 +20,12 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/kvproto/pkg/metapb"
-	"github.com/pingcap/pd/pkg/mock/mockid"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/server/core"
-	"github.com/pingcap/pd/tests"
+	"github.com/pingcap/pd/v3/pkg/mock/mockid"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/server/core"
+	"github.com/pingcap/pd/v3/tests"
 	"go.uber.org/goleak"
 )
 
diff --git a/tests/server/server_test.go b/tests/server/server_test.go
index 05054820e..0ed8bc0b2 100644
--- a/tests/server/server_test.go
+++ b/tests/server/server_test.go
@@ -18,14 +18,14 @@ import (
 	"testing"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/pkg/tempurl"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/tests"
+	"github.com/pingcap/pd/v3/pkg/tempurl"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/tests"
 	"go.uber.org/goleak"
 
 	// Register schedulers.
-	_ "github.com/pingcap/pd/server/schedulers"
+	_ "github.com/pingcap/pd/v3/server/schedulers"
 )
 
 func Test(t *testing.T) {
diff --git a/tests/server/tso/tso_test.go b/tests/server/tso/tso_test.go
index 2120e9c62..aa1ec5876 100644
--- a/tests/server/tso/tso_test.go
+++ b/tests/server/tso/tso_test.go
@@ -23,9 +23,9 @@ import (
 	. "github.com/pingcap/check"
 	"github.com/pingcap/failpoint"
 	"github.com/pingcap/kvproto/pkg/pdpb"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/tests"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/tests"
 	"go.uber.org/goleak"
 )
 
@@ -182,8 +182,8 @@ type testTimeFallBackSuite struct {
 
 func (s *testTimeFallBackSuite) SetUpSuite(c *C) {
 	s.ctx, s.cancel = context.WithCancel(context.Background())
-	c.Assert(failpoint.Enable("github.com/pingcap/pd/server/tso/fallBackSync", `return(true)`), IsNil)
-	c.Assert(failpoint.Enable("github.com/pingcap/pd/server/tso/fallBackUpdate", `return(true)`), IsNil)
+	c.Assert(failpoint.Enable("github.com/pingcap/pd/v3/server/tso/fallBackSync", `return(true)`), IsNil)
+	c.Assert(failpoint.Enable("github.com/pingcap/pd/v3/server/tso/fallBackUpdate", `return(true)`), IsNil)
 	var err error
 	s.cluster, err = tests.NewTestCluster(s.ctx, 1)
 	c.Assert(err, IsNil)
@@ -196,8 +196,8 @@ func (s *testTimeFallBackSuite) SetUpSuite(c *C) {
 	s.grpcPDClient = testutil.MustNewGrpcClient(c, s.server.GetAddr())
 	svr := s.server.GetServer()
 	svr.Close()
-	failpoint.Disable("github.com/pingcap/pd/server/tso/fallBackSync")
-	failpoint.Disable("github.com/pingcap/pd/server/tso/fallBackUpdate")
+	failpoint.Disable("github.com/pingcap/pd/v3/server/tso/fallBackSync")
+	failpoint.Disable("github.com/pingcap/pd/v3/server/tso/fallBackUpdate")
 	err = svr.Run()
 	c.Assert(err, IsNil)
 	s.cluster.WaitLeader()
@@ -277,7 +277,7 @@ func (s *testFollowerTsoSuite) TearDownSuite(c *C) {
 }
 
 func (s *testFollowerTsoSuite) TestRequest(c *C) {
-	c.Assert(failpoint.Enable("github.com/pingcap/pd/server/tso/skipRetryGetTS", `return(true)`), IsNil)
+	c.Assert(failpoint.Enable("github.com/pingcap/pd/v3/server/tso/skipRetryGetTS", `return(true)`), IsNil)
 	var err error
 	cluster, err := tests.NewTestCluster(s.ctx, 2)
 	defer cluster.Destroy()
@@ -309,5 +309,5 @@ func (s *testFollowerTsoSuite) TestRequest(c *C) {
 	_, err = tsoClient.Recv()
 	c.Assert(err, NotNil)
 	c.Assert(strings.Contains(err.Error(), "can not get timestamp"), IsTrue)
-	failpoint.Disable("github.com/pingcap/pd/server/tso/skipRetryGetTS")
+	failpoint.Disable("github.com/pingcap/pd/v3/server/tso/skipRetryGetTS")
 }
diff --git a/tests/server/watch/leader_watch_test.go b/tests/server/watch/leader_watch_test.go
index 804def970..483ab09a8 100644
--- a/tests/server/watch/leader_watch_test.go
+++ b/tests/server/watch/leader_watch_test.go
@@ -20,10 +20,10 @@ import (
 
 	. "github.com/pingcap/check"
 	"github.com/pingcap/failpoint"
-	"github.com/pingcap/pd/pkg/testutil"
-	"github.com/pingcap/pd/server"
-	"github.com/pingcap/pd/server/config"
-	"github.com/pingcap/pd/tests"
+	"github.com/pingcap/pd/v3/pkg/testutil"
+	"github.com/pingcap/pd/v3/server"
+	"github.com/pingcap/pd/v3/server/config"
+	"github.com/pingcap/pd/v3/tests"
 	"go.uber.org/goleak"
 )
 
@@ -71,7 +71,7 @@ func (s *serverTestSuite) TestWatcher(c *C) {
 	time.Sleep(5 * time.Second)
 	pd3, err := cluster.Join(s.ctx)
 	c.Assert(err, IsNil)
-	c.Assert(failpoint.Enable("github.com/pingcap/pd/server/delayWatcher", `pause`), IsNil)
+	c.Assert(failpoint.Enable("github.com/pingcap/pd/v3/server/delayWatcher", `pause`), IsNil)
 	err = pd3.Run()
 	c.Assert(err, IsNil)
 	time.Sleep(200 * time.Millisecond)
@@ -80,7 +80,7 @@ func (s *serverTestSuite) TestWatcher(c *C) {
 	c.Assert(err, IsNil)
 	cluster.WaitLeader()
 	c.Assert(pd2.GetLeader().GetName(), Equals, pd2.GetConfig().Name)
-	failpoint.Disable("github.com/pingcap/pd/server/delayWatcher")
+	failpoint.Disable("github.com/pingcap/pd/v3/server/delayWatcher")
 	testutil.WaitUntil(c, func(c *C) bool {
 		return c.Check(pd3.GetLeader().GetName(), Equals, pd2.GetConfig().Name)
 	})
diff --git a/tools/pd-simulator/simulator/simutil/key_test.go b/tools/pd-simulator/simulator/simutil/key_test.go
index 30e098091..3409ba6a5 100644
--- a/tools/pd-simulator/simulator/simutil/key_test.go
+++ b/tools/pd-simulator/simulator/simutil/key_test.go
@@ -17,7 +17,7 @@ import (
 	"testing"
 
 	. "github.com/pingcap/check"
-	"github.com/pingcap/pd/pkg/codec"
+	"github.com/pingcap/pd/v3/pkg/codec"
 )
 
 func Test(t *testing.T) {