diff --git a/pkg/mock/mockcluster/mockcluster.go b/pkg/mock/mockcluster/mockcluster.go index 2ec652e2846..f03e99bbd32 100644 --- a/pkg/mock/mockcluster/mockcluster.go +++ b/pkg/mock/mockcluster/mockcluster.go @@ -29,6 +29,7 @@ import ( "github.com/tikv/pd/pkg/errs" "github.com/tikv/pd/pkg/id" "github.com/tikv/pd/pkg/mock/mockid" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/utils/typeutil" "github.com/tikv/pd/pkg/versioninfo" "github.com/tikv/pd/server/config" @@ -36,7 +37,6 @@ import ( "github.com/tikv/pd/server/schedule/placement" "github.com/tikv/pd/server/statistics" "github.com/tikv/pd/server/statistics/buckets" - "github.com/tikv/pd/server/storage" ) const ( diff --git a/server/storage/etcd_backend.go b/pkg/storage/etcd_backend.go similarity index 100% rename from server/storage/etcd_backend.go rename to pkg/storage/etcd_backend.go diff --git a/server/storage/hot_region_storage.go b/pkg/storage/hot_region_storage.go similarity index 100% rename from server/storage/hot_region_storage.go rename to pkg/storage/hot_region_storage.go diff --git a/server/storage/hot_region_storage_test.go b/pkg/storage/hot_region_storage_test.go similarity index 100% rename from server/storage/hot_region_storage_test.go rename to pkg/storage/hot_region_storage_test.go diff --git a/server/storage/keyspace_test.go b/pkg/storage/keyspace_test.go similarity index 100% rename from server/storage/keyspace_test.go rename to pkg/storage/keyspace_test.go diff --git a/server/storage/leveldb_backend.go b/pkg/storage/leveldb_backend.go similarity index 100% rename from server/storage/leveldb_backend.go rename to pkg/storage/leveldb_backend.go diff --git a/server/storage/memory_backend.go b/pkg/storage/memory_backend.go similarity index 100% rename from server/storage/memory_backend.go rename to pkg/storage/memory_backend.go diff --git a/server/storage/storage.go b/pkg/storage/storage.go similarity index 100% rename from server/storage/storage.go rename to pkg/storage/storage.go diff --git a/server/storage/storage_gc_test.go b/pkg/storage/storage_gc_test.go similarity index 100% rename from server/storage/storage_gc_test.go rename to pkg/storage/storage_gc_test.go diff --git a/server/storage/storage_test.go b/pkg/storage/storage_test.go similarity index 100% rename from server/storage/storage_test.go rename to pkg/storage/storage_test.go diff --git a/server/storage/storage_tso_test.go b/pkg/storage/storage_tso_test.go similarity index 100% rename from server/storage/storage_tso_test.go rename to pkg/storage/storage_tso_test.go diff --git a/server/api/hot_status.go b/server/api/hot_status.go index 1b04638a94d..f123465cd5c 100644 --- a/server/api/hot_status.go +++ b/server/api/hot_status.go @@ -21,9 +21,9 @@ import ( "net/http" "strconv" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/server" "github.com/tikv/pd/server/statistics" - "github.com/tikv/pd/server/storage" "github.com/unrolled/render" ) diff --git a/server/api/hot_status_test.go b/server/api/hot_status_test.go index b1318376e46..1582d62d703 100644 --- a/server/api/hot_status_test.go +++ b/server/api/hot_status_test.go @@ -22,10 +22,10 @@ import ( "github.com/stretchr/testify/suite" "github.com/syndtr/goleveldb/leveldb" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/storage/kv" tu "github.com/tikv/pd/pkg/utils/testutil" "github.com/tikv/pd/server" - "github.com/tikv/pd/server/storage" ) type hotStatusTestSuite struct { diff --git a/server/cluster/cluster.go b/server/cluster/cluster.go index 9cf041afeff..dd554d67b66 100644 --- a/server/cluster/cluster.go +++ b/server/cluster/cluster.go @@ -37,6 +37,7 @@ import ( "github.com/tikv/pd/pkg/id" "github.com/tikv/pd/pkg/progress" "github.com/tikv/pd/pkg/slice" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/storage/endpoint" "github.com/tikv/pd/pkg/utils/etcdutil" "github.com/tikv/pd/pkg/utils/logutil" @@ -55,7 +56,6 @@ import ( "github.com/tikv/pd/server/schedulers" "github.com/tikv/pd/server/statistics" "github.com/tikv/pd/server/statistics/buckets" - "github.com/tikv/pd/server/storage" "go.etcd.io/etcd/clientv3" "go.uber.org/zap" ) diff --git a/server/cluster/cluster_test.go b/server/cluster/cluster_test.go index 849d2074db9..f69b0fe6c2a 100644 --- a/server/cluster/cluster_test.go +++ b/server/cluster/cluster_test.go @@ -33,6 +33,7 @@ import ( "github.com/tikv/pd/pkg/id" "github.com/tikv/pd/pkg/mock/mockid" "github.com/tikv/pd/pkg/progress" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/versioninfo" "github.com/tikv/pd/server/config" "github.com/tikv/pd/server/schedule" @@ -41,7 +42,6 @@ import ( "github.com/tikv/pd/server/schedule/placement" "github.com/tikv/pd/server/schedulers" "github.com/tikv/pd/server/statistics" - "github.com/tikv/pd/server/storage" ) func TestStoreHeartbeat(t *testing.T) { diff --git a/server/cluster/cluster_worker_test.go b/server/cluster/cluster_worker_test.go index 795b0bfd2e2..b376b38edc3 100644 --- a/server/cluster/cluster_worker_test.go +++ b/server/cluster/cluster_worker_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/mock/mockid" - "github.com/tikv/pd/server/storage" + "github.com/tikv/pd/pkg/storage" ) func TestReportSplit(t *testing.T) { diff --git a/server/cluster/coordinator.go b/server/cluster/coordinator.go index 9e5a4de5d52..5b1cf21b87d 100644 --- a/server/cluster/coordinator.go +++ b/server/cluster/coordinator.go @@ -29,6 +29,7 @@ import ( "github.com/tikv/pd/pkg/cache" "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/errs" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/utils/logutil" "github.com/tikv/pd/pkg/utils/syncutil" "github.com/tikv/pd/server/config" @@ -39,7 +40,6 @@ import ( "github.com/tikv/pd/server/schedule/plan" "github.com/tikv/pd/server/schedulers" "github.com/tikv/pd/server/statistics" - "github.com/tikv/pd/server/storage" "go.uber.org/zap" ) diff --git a/server/cluster/coordinator_test.go b/server/cluster/coordinator_test.go index 7789d3b4350..5985f0dc0ef 100644 --- a/server/cluster/coordinator_test.go +++ b/server/cluster/coordinator_test.go @@ -31,6 +31,7 @@ import ( "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/core/storelimit" "github.com/tikv/pd/pkg/mock/mockhbstream" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/utils/testutil" "github.com/tikv/pd/pkg/utils/typeutil" "github.com/tikv/pd/server/config" @@ -40,7 +41,6 @@ import ( "github.com/tikv/pd/server/schedule/operator" "github.com/tikv/pd/server/schedulers" "github.com/tikv/pd/server/statistics" - "github.com/tikv/pd/server/storage" ) func newTestOperator(regionID uint64, regionEpoch *metapb.RegionEpoch, kind operator.OpKind, steps ...operator.OpStep) *operator.Operator { diff --git a/server/cluster/unsafe_recovery_controller_test.go b/server/cluster/unsafe_recovery_controller_test.go index da5f6883f9c..7edc419c999 100644 --- a/server/cluster/unsafe_recovery_controller_test.go +++ b/server/cluster/unsafe_recovery_controller_test.go @@ -27,8 +27,8 @@ import ( "github.com/tikv/pd/pkg/codec" "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/mock/mockid" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/server/schedule/hbstream" - "github.com/tikv/pd/server/storage" ) func newStoreHeartbeat(storeID uint64, report *pdpb.StoreReport) *pdpb.StoreHeartbeatRequest { diff --git a/server/config/config_test.go b/server/config/config_test.go index fc922f5337c..81c937717cc 100644 --- a/server/config/config_test.go +++ b/server/config/config_test.go @@ -25,7 +25,7 @@ import ( "github.com/BurntSushi/toml" "github.com/stretchr/testify/require" - "github.com/tikv/pd/server/storage" + "github.com/tikv/pd/pkg/storage" ) func TestSecurity(t *testing.T) { diff --git a/server/handler.go b/server/handler.go index 4d7970058f8..968c80cf221 100644 --- a/server/handler.go +++ b/server/handler.go @@ -33,6 +33,7 @@ import ( "github.com/tikv/pd/pkg/core/storelimit" "github.com/tikv/pd/pkg/encryption" "github.com/tikv/pd/pkg/errs" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/tso" "github.com/tikv/pd/pkg/utils/apiutil" "github.com/tikv/pd/pkg/utils/syncutil" @@ -44,7 +45,6 @@ import ( "github.com/tikv/pd/server/schedule/placement" "github.com/tikv/pd/server/schedulers" "github.com/tikv/pd/server/statistics" - "github.com/tikv/pd/server/storage" "go.uber.org/zap" ) diff --git a/server/region_syncer/client.go b/server/region_syncer/client.go index 0d195c74c47..94acb5b1ae9 100644 --- a/server/region_syncer/client.go +++ b/server/region_syncer/client.go @@ -24,8 +24,8 @@ import ( "github.com/pingcap/log" "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/errs" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/utils/grpcutil" - "github.com/tikv/pd/server/storage" "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/backoff" diff --git a/server/region_syncer/client_test.go b/server/region_syncer/client_test.go index 419da6f54d2..d0e1148bef2 100644 --- a/server/region_syncer/client_test.go +++ b/server/region_syncer/client_test.go @@ -24,8 +24,8 @@ import ( "github.com/pingcap/kvproto/pkg/pdpb" "github.com/stretchr/testify/require" "github.com/tikv/pd/pkg/core" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/utils/grpcutil" - "github.com/tikv/pd/server/storage" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) @@ -45,9 +45,9 @@ func TestLoadRegion(t *testing.T) { for i := 0; i < 30; i++ { rs.SaveRegion(&metapb.Region{Id: uint64(i) + 1}) } - re.NoError(failpoint.Enable("github.com/tikv/pd/server/storage/base_backend/slowLoadRegion", "return(true)")) + re.NoError(failpoint.Enable("github.com/tikv/pd/pkg/storage/base_backend/slowLoadRegion", "return(true)")) defer func() { - re.NoError(failpoint.Disable("github.com/tikv/pd/server/storage/base_backend/slowLoadRegion")) + re.NoError(failpoint.Disable("github.com/tikv/pd/pkg/storage/base_backend/slowLoadRegion")) }() rc := NewRegionSyncer(server) diff --git a/server/region_syncer/server.go b/server/region_syncer/server.go index b7626cc3ecf..fe28434ddb1 100644 --- a/server/region_syncer/server.go +++ b/server/region_syncer/server.go @@ -29,10 +29,10 @@ import ( "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/errs" "github.com/tikv/pd/pkg/ratelimit" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/storage/kv" "github.com/tikv/pd/pkg/utils/grpcutil" "github.com/tikv/pd/pkg/utils/syncutil" - "github.com/tikv/pd/server/storage" "go.uber.org/zap" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/server/replication/replication_mode_test.go b/server/replication/replication_mode_test.go index 371618e7a17..cf049301803 100644 --- a/server/replication/replication_mode_test.go +++ b/server/replication/replication_mode_test.go @@ -26,9 +26,9 @@ import ( "github.com/stretchr/testify/require" "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/mock/mockcluster" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/utils/typeutil" "github.com/tikv/pd/server/config" - "github.com/tikv/pd/server/storage" ) func TestInitial(t *testing.T) { diff --git a/server/schedulers/balance_test.go b/server/schedulers/balance_test.go index 2394f38112b..1aec5d0d35c 100644 --- a/server/schedulers/balance_test.go +++ b/server/schedulers/balance_test.go @@ -27,6 +27,7 @@ import ( "github.com/stretchr/testify/suite" "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/mock/mockcluster" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/utils/testutil" "github.com/tikv/pd/pkg/versioninfo" "github.com/tikv/pd/server/config" @@ -34,7 +35,6 @@ import ( "github.com/tikv/pd/server/schedule/hbstream" "github.com/tikv/pd/server/schedule/operator" "github.com/tikv/pd/server/schedule/plan" - "github.com/tikv/pd/server/storage" ) type testBalanceSpeedCase struct { diff --git a/server/schedulers/balance_witness_test.go b/server/schedulers/balance_witness_test.go index b6479ac8b18..ac7bd8dd185 100644 --- a/server/schedulers/balance_witness_test.go +++ b/server/schedulers/balance_witness_test.go @@ -20,11 +20,11 @@ import ( "github.com/stretchr/testify/suite" "github.com/tikv/pd/pkg/mock/mockcluster" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/server/config" "github.com/tikv/pd/server/schedule" "github.com/tikv/pd/server/schedule/operator" "github.com/tikv/pd/server/schedule/placement" - "github.com/tikv/pd/server/storage" ) func TestBalanceWitnessSchedulerTestSuite(t *testing.T) { diff --git a/server/schedulers/evict_leader_test.go b/server/schedulers/evict_leader_test.go index 609b84dc913..c2f6af4f71d 100644 --- a/server/schedulers/evict_leader_test.go +++ b/server/schedulers/evict_leader_test.go @@ -24,11 +24,11 @@ import ( "github.com/stretchr/testify/require" "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/mock/mockcluster" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/utils/testutil" "github.com/tikv/pd/server/config" "github.com/tikv/pd/server/schedule" "github.com/tikv/pd/server/schedule/operator" - "github.com/tikv/pd/server/storage" ) func TestEvictLeader(t *testing.T) { diff --git a/server/schedulers/evict_slow_store_test.go b/server/schedulers/evict_slow_store_test.go index f1dca1472ed..ab901244660 100644 --- a/server/schedulers/evict_slow_store_test.go +++ b/server/schedulers/evict_slow_store_test.go @@ -24,11 +24,11 @@ import ( "github.com/stretchr/testify/suite" "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/mock/mockcluster" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/utils/testutil" "github.com/tikv/pd/server/config" "github.com/tikv/pd/server/schedule" "github.com/tikv/pd/server/schedule/operator" - "github.com/tikv/pd/server/storage" ) type evictSlowStoreTestSuite struct { diff --git a/server/schedulers/hot_region_test.go b/server/schedulers/hot_region_test.go index 199dbe9eb89..7e514efb923 100644 --- a/server/schedulers/hot_region_test.go +++ b/server/schedulers/hot_region_test.go @@ -26,6 +26,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/mock/mockcluster" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/storage/endpoint" "github.com/tikv/pd/pkg/utils/testutil" "github.com/tikv/pd/pkg/utils/typeutil" @@ -35,7 +36,6 @@ import ( "github.com/tikv/pd/server/schedule/operator" "github.com/tikv/pd/server/schedule/placement" "github.com/tikv/pd/server/statistics" - "github.com/tikv/pd/server/storage" ) func init() { diff --git a/server/schedulers/hot_region_v2_test.go b/server/schedulers/hot_region_v2_test.go index 411286b483a..9db102da228 100644 --- a/server/schedulers/hot_region_v2_test.go +++ b/server/schedulers/hot_region_v2_test.go @@ -21,13 +21,13 @@ import ( "github.com/docker/go-units" "github.com/stretchr/testify/require" "github.com/tikv/pd/pkg/mock/mockcluster" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/utils/testutil" "github.com/tikv/pd/pkg/versioninfo" "github.com/tikv/pd/server/config" "github.com/tikv/pd/server/schedule" "github.com/tikv/pd/server/schedule/operator" "github.com/tikv/pd/server/statistics" - "github.com/tikv/pd/server/storage" ) func TestHotWriteRegionScheduleWithRevertRegionsDimSecond(t *testing.T) { diff --git a/server/schedulers/scheduler_test.go b/server/schedulers/scheduler_test.go index 5e8c3f8986a..2464df420fa 100644 --- a/server/schedulers/scheduler_test.go +++ b/server/schedulers/scheduler_test.go @@ -23,6 +23,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/mock/mockcluster" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/utils/testutil" "github.com/tikv/pd/pkg/versioninfo" "github.com/tikv/pd/server/config" @@ -30,7 +31,6 @@ import ( "github.com/tikv/pd/server/schedule/operator" "github.com/tikv/pd/server/schedule/placement" "github.com/tikv/pd/server/statistics" - "github.com/tikv/pd/server/storage" ) func TestShuffleLeader(t *testing.T) { diff --git a/server/schedulers/transfer_witness_leader_test.go b/server/schedulers/transfer_witness_leader_test.go index 0a8321d5d6f..8657feb3039 100644 --- a/server/schedulers/transfer_witness_leader_test.go +++ b/server/schedulers/transfer_witness_leader_test.go @@ -23,11 +23,11 @@ import ( "github.com/stretchr/testify/require" "github.com/tikv/pd/pkg/core" "github.com/tikv/pd/pkg/mock/mockcluster" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/utils/testutil" "github.com/tikv/pd/server/config" "github.com/tikv/pd/server/schedule" "github.com/tikv/pd/server/schedule/operator" - "github.com/tikv/pd/server/storage" ) func TestTransferWitnessLeader(t *testing.T) { diff --git a/server/server.go b/server/server.go index fa21790a6f2..2272e69db1d 100644 --- a/server/server.go +++ b/server/server.go @@ -46,6 +46,7 @@ import ( "github.com/tikv/pd/pkg/id" "github.com/tikv/pd/pkg/member" "github.com/tikv/pd/pkg/ratelimit" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/storage/endpoint" "github.com/tikv/pd/pkg/storage/kv" "github.com/tikv/pd/pkg/systimemon" @@ -66,7 +67,6 @@ import ( "github.com/tikv/pd/server/schedule" "github.com/tikv/pd/server/schedule/hbstream" "github.com/tikv/pd/server/schedule/placement" - "github.com/tikv/pd/server/storage" "go.etcd.io/etcd/clientv3" "go.etcd.io/etcd/embed" "go.etcd.io/etcd/pkg/types" diff --git a/server/statistics/region_collection_test.go b/server/statistics/region_collection_test.go index cfa84c35219..c7c8e42fea0 100644 --- a/server/statistics/region_collection_test.go +++ b/server/statistics/region_collection_test.go @@ -21,9 +21,9 @@ import ( "github.com/pingcap/kvproto/pkg/pdpb" "github.com/stretchr/testify/require" "github.com/tikv/pd/pkg/core" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/server/config" "github.com/tikv/pd/server/schedule/placement" - "github.com/tikv/pd/server/storage" ) func TestRegionStatistics(t *testing.T) { diff --git a/tests/pdctl/hot/hot_test.go b/tests/pdctl/hot/hot_test.go index 96ab1b94baf..bded83a6ea1 100644 --- a/tests/pdctl/hot/hot_test.go +++ b/tests/pdctl/hot/hot_test.go @@ -26,12 +26,12 @@ import ( "github.com/pingcap/kvproto/pkg/pdpb" "github.com/stretchr/testify/require" "github.com/tikv/pd/pkg/core" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/utils/testutil" "github.com/tikv/pd/pkg/utils/typeutil" "github.com/tikv/pd/server/api" "github.com/tikv/pd/server/config" "github.com/tikv/pd/server/statistics" - "github.com/tikv/pd/server/storage" "github.com/tikv/pd/tests" "github.com/tikv/pd/tests/pdctl" pdctlCmd "github.com/tikv/pd/tools/pd-ctl/pdctl" diff --git a/tests/server/cluster/cluster_test.go b/tests/server/cluster/cluster_test.go index dd6ea6d093e..527f54c6fcc 100644 --- a/tests/server/cluster/cluster_test.go +++ b/tests/server/cluster/cluster_test.go @@ -35,6 +35,7 @@ import ( "github.com/tikv/pd/pkg/dashboard" "github.com/tikv/pd/pkg/id" "github.com/tikv/pd/pkg/mock/mockid" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/tso" "github.com/tikv/pd/pkg/utils/testutil" "github.com/tikv/pd/pkg/utils/tsoutil" @@ -44,7 +45,6 @@ import ( "github.com/tikv/pd/server/config" syncer "github.com/tikv/pd/server/region_syncer" "github.com/tikv/pd/server/schedule/operator" - "github.com/tikv/pd/server/storage" "github.com/tikv/pd/tests" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/tests/server/region_syncer/region_syncer_test.go b/tests/server/region_syncer/region_syncer_test.go index be17dc9b5d5..aa9f76d157d 100644 --- a/tests/server/region_syncer/region_syncer_test.go +++ b/tests/server/region_syncer/region_syncer_test.go @@ -48,7 +48,7 @@ func TestRegionSyncer(t *testing.T) { re := require.New(t) ctx, cancel := context.WithCancel(context.Background()) defer cancel() - re.NoError(failpoint.Enable("github.com/tikv/pd/server/storage/regionStorageFastFlush", `return(true)`)) + re.NoError(failpoint.Enable("github.com/tikv/pd/pkg/storage/regionStorageFastFlush", `return(true)`)) re.NoError(failpoint.Enable("github.com/tikv/pd/server/syncer/noFastExitSync", `return(true)`)) cluster, err := tests.NewTestCluster(ctx, 3, func(conf *config.Config, serverName string) { conf.PDServerCfg.UseRegionStorage = true }) @@ -152,7 +152,7 @@ func TestRegionSyncer(t *testing.T) { re.Equal(region.GetBuckets(), r.GetBuckets()) } re.NoError(failpoint.Disable("github.com/tikv/pd/server/syncer/noFastExitSync")) - re.NoError(failpoint.Disable("github.com/tikv/pd/server/storage/regionStorageFastFlush")) + re.NoError(failpoint.Disable("github.com/tikv/pd/pkg/storage/regionStorageFastFlush")) } func TestFullSyncWithAddMember(t *testing.T) { diff --git a/tests/server/storage/hot_region_storage_test.go b/tests/server/storage/hot_region_storage_test.go index 3ba950c8eaa..6794b77c594 100644 --- a/tests/server/storage/hot_region_storage_test.go +++ b/tests/server/storage/hot_region_storage_test.go @@ -23,10 +23,10 @@ import ( "github.com/pingcap/kvproto/pkg/pdpb" "github.com/stretchr/testify/require" "github.com/tikv/pd/pkg/core" + "github.com/tikv/pd/pkg/storage" "github.com/tikv/pd/pkg/utils/testutil" "github.com/tikv/pd/server/config" "github.com/tikv/pd/server/statistics" - "github.com/tikv/pd/server/storage" "github.com/tikv/pd/tests" "github.com/tikv/pd/tests/pdctl" ) diff --git a/tools/pd-ctl/pdctl/command/hot_command.go b/tools/pd-ctl/pdctl/command/hot_command.go index 34931f8916b..c78b4a38d8a 100644 --- a/tools/pd-ctl/pdctl/command/hot_command.go +++ b/tools/pd-ctl/pdctl/command/hot_command.go @@ -24,7 +24,7 @@ import ( "github.com/pingcap/errors" "github.com/spf13/cobra" - "github.com/tikv/pd/server/storage" + "github.com/tikv/pd/pkg/storage" ) const (