Skip to content

Commit

Permalink
move out replication and syncer
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <rleungx@gmail.com>
  • Loading branch information
rleungx committed May 26, 2023
1 parent 8b16b71 commit 78f8c95
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 6 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions server/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
"github.com/tikv/pd/pkg/keyspace"
"github.com/tikv/pd/pkg/memory"
"github.com/tikv/pd/pkg/progress"
"github.com/tikv/pd/pkg/replication"
"github.com/tikv/pd/pkg/schedule"
"github.com/tikv/pd/pkg/schedule/checker"
sc "github.com/tikv/pd/pkg/schedule/config"
Expand All @@ -52,6 +53,7 @@ import (
"github.com/tikv/pd/pkg/statistics/buckets"
"github.com/tikv/pd/pkg/storage"
"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/pkg/syncer"
"github.com/tikv/pd/pkg/unsaferecovery"
"github.com/tikv/pd/pkg/utils/etcdutil"
"github.com/tikv/pd/pkg/utils/logutil"
Expand All @@ -60,8 +62,6 @@ import (
"github.com/tikv/pd/pkg/utils/typeutil"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server/config"
syncer "github.com/tikv/pd/server/regionsyncer"
"github.com/tikv/pd/server/replication"
"go.etcd.io/etcd/clientv3"
"go.uber.org/zap"
)
Expand Down
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import (
"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/syncer"
"github.com/tikv/pd/pkg/systimemon"
"github.com/tikv/pd/pkg/tso"
"github.com/tikv/pd/pkg/utils/apiutil"
Expand All @@ -75,7 +76,6 @@ import (
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server/cluster"
"github.com/tikv/pd/server/config"
syncer "github.com/tikv/pd/server/regionsyncer"
"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/embed"
"go.etcd.io/etcd/mvcc/mvccpb"
Expand Down
2 changes: 1 addition & 1 deletion tests/server/cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ import (
"github.com/tikv/pd/pkg/mock/mockid"
"github.com/tikv/pd/pkg/schedule/operator"
"github.com/tikv/pd/pkg/storage"
"github.com/tikv/pd/pkg/syncer"
"github.com/tikv/pd/pkg/tso"
"github.com/tikv/pd/pkg/utils/testutil"
"github.com/tikv/pd/pkg/utils/tsoutil"
"github.com/tikv/pd/pkg/utils/typeutil"
"github.com/tikv/pd/server"
"github.com/tikv/pd/server/cluster"
"github.com/tikv/pd/server/config"
syncer "github.com/tikv/pd/server/regionsyncer"
"github.com/tikv/pd/tests"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
4 changes: 2 additions & 2 deletions tests/server/region_syncer/region_syncer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestRegionSyncer(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
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)`))
re.NoError(failpoint.Enable("github.com/tikv/pd/pkg/syncer/noFastExitSync", `return(true)`))

cluster, err := tests.NewTestCluster(ctx, 3, func(conf *config.Config, serverName string) { conf.PDServerCfg.UseRegionStorage = true })
defer cluster.Destroy()
Expand Down Expand Up @@ -151,7 +151,7 @@ func TestRegionSyncer(t *testing.T) {
re.Equal(region.GetLeader(), r.GetLeader())
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/pkg/syncer/noFastExitSync"))
re.NoError(failpoint.Disable("github.com/tikv/pd/pkg/storage/regionStorageFastFlush"))
}

Expand Down

0 comments on commit 78f8c95

Please sign in to comment.