Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into add-registry
Browse files Browse the repository at this point in the history
Conflicts:
	server/server.go
	server/util.go
  • Loading branch information
nolouch committed Dec 14, 2022
2 parents a1e1deb + 84c0f82 commit b4df235
Show file tree
Hide file tree
Showing 95 changed files with 98 additions and 97 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/mock/mockcluster/mockcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ import (
"github.com/pingcap/kvproto/pkg/pdpb"
"github.com/pingcap/log"
"github.com/tikv/pd/pkg/errs"
"github.com/tikv/pd/pkg/id"
"github.com/tikv/pd/pkg/mock/mockid"
"github.com/tikv/pd/pkg/utils/typeutil"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server/config"
"github.com/tikv/pd/server/core"
"github.com/tikv/pd/server/core/storelimit"
"github.com/tikv/pd/server/id"
"github.com/tikv/pd/server/schedule/labeler"
"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"
"github.com/tikv/pd/server/versioninfo"
)

const (
Expand Down
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.
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.
2 changes: 1 addition & 1 deletion plugin/scheduler_example/evict_leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/pingcap/errors"
"github.com/pingcap/log"
"github.com/tikv/pd/pkg/errs"
"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/pkg/utils/apiutil"
"github.com/tikv/pd/pkg/utils/syncutil"
"github.com/tikv/pd/server/core"
Expand All @@ -31,7 +32,6 @@ import (
"github.com/tikv/pd/server/schedule/operator"
"github.com/tikv/pd/server/schedule/plan"
"github.com/tikv/pd/server/schedulers"
"github.com/tikv/pd/server/storage/endpoint"
"github.com/unrolled/render"
)

Expand Down
2 changes: 1 addition & 1 deletion server/api/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"github.com/stretchr/testify/suite"
tu "github.com/tikv/pd/pkg/utils/testutil"
"github.com/tikv/pd/pkg/utils/typeutil"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server"
"github.com/tikv/pd/server/config"
"github.com/tikv/pd/server/versioninfo"
)

type configTestSuite struct {
Expand Down
2 changes: 1 addition & 1 deletion server/api/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ import (
"github.com/tikv/pd/pkg/mock/mockhbstream"
"github.com/tikv/pd/pkg/utils/apiutil"
tu "github.com/tikv/pd/pkg/utils/testutil"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server"
"github.com/tikv/pd/server/config"
"github.com/tikv/pd/server/core"
pdoperator "github.com/tikv/pd/server/schedule/operator"
"github.com/tikv/pd/server/schedule/placement"
"github.com/tikv/pd/server/versioninfo"
)

type operatorTestSuite struct {
Expand Down
2 changes: 1 addition & 1 deletion server/api/pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"time"

"github.com/pingcap/log"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server"
"github.com/tikv/pd/server/versioninfo"
"github.com/unrolled/render"
"go.uber.org/zap"
)
Expand Down
2 changes: 1 addition & 1 deletion server/api/service_gc_safepoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"net/http"

"github.com/gorilla/mux"
"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/server"
"github.com/tikv/pd/server/storage/endpoint"
"github.com/unrolled/render"
)

Expand Down
2 changes: 1 addition & 1 deletion server/api/service_gc_safepoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (

"github.com/pingcap/kvproto/pkg/metapb"
"github.com/stretchr/testify/suite"
"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/pkg/utils/apiutil"
"github.com/tikv/pd/server"
"github.com/tikv/pd/server/storage/endpoint"
)

type serviceGCSafepointTestSuite struct {
Expand Down
2 changes: 1 addition & 1 deletion server/api/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package api
import (
"net/http"

"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server"
"github.com/tikv/pd/server/versioninfo"
"github.com/unrolled/render"
)

Expand Down
2 changes: 1 addition & 1 deletion server/api/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"testing"

"github.com/stretchr/testify/require"
"github.com/tikv/pd/server/versioninfo"
"github.com/tikv/pd/pkg/versioninfo"
)

func checkStatusResponse(re *require.Assertions, body []byte) {
Expand Down
2 changes: 1 addition & 1 deletion server/api/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package api
import (
"net/http"

"github.com/tikv/pd/server/versioninfo"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/unrolled/render"
)

Expand Down
6 changes: 3 additions & 3 deletions server/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,19 @@ import (
"github.com/pingcap/kvproto/pkg/pdpb"
"github.com/pingcap/log"
"github.com/tikv/pd/pkg/errs"
"github.com/tikv/pd/pkg/id"
"github.com/tikv/pd/pkg/progress"
"github.com/tikv/pd/pkg/slice"
"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/pkg/utils/etcdutil"
"github.com/tikv/pd/pkg/utils/logutil"
"github.com/tikv/pd/pkg/utils/netutil"
"github.com/tikv/pd/pkg/utils/syncutil"
"github.com/tikv/pd/pkg/utils/typeutil"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server/config"
"github.com/tikv/pd/server/core"
"github.com/tikv/pd/server/core/storelimit"
"github.com/tikv/pd/server/id"
syncer "github.com/tikv/pd/server/region_syncer"
"github.com/tikv/pd/server/replication"
"github.com/tikv/pd/server/schedule"
Expand All @@ -54,8 +56,6 @@ import (
"github.com/tikv/pd/server/statistics"
"github.com/tikv/pd/server/statistics/buckets"
"github.com/tikv/pd/server/storage"
"github.com/tikv/pd/server/storage/endpoint"
"github.com/tikv/pd/server/versioninfo"
"go.etcd.io/etcd/clientv3"
"go.uber.org/zap"
)
Expand Down
4 changes: 2 additions & 2 deletions server/cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ import (
"github.com/pingcap/kvproto/pkg/pdpb"
"github.com/stretchr/testify/require"
"github.com/tikv/pd/pkg/errs"
"github.com/tikv/pd/pkg/id"
"github.com/tikv/pd/pkg/mock/mockid"
"github.com/tikv/pd/pkg/progress"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server/config"
"github.com/tikv/pd/server/core"
"github.com/tikv/pd/server/id"
"github.com/tikv/pd/server/schedule"
"github.com/tikv/pd/server/schedule/filter"
"github.com/tikv/pd/server/schedule/labeler"
"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"
"github.com/tikv/pd/server/versioninfo"
)

func TestStoreHeartbeat(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/cluster/cluster_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"github.com/tikv/pd/pkg/errs"
"github.com/tikv/pd/pkg/utils/logutil"
"github.com/tikv/pd/pkg/utils/typeutil"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server/core"
"github.com/tikv/pd/server/schedule"
"github.com/tikv/pd/server/statistics/buckets"
"github.com/tikv/pd/server/versioninfo"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import (
"github.com/tikv/pd/pkg/utils/metricutil"
"github.com/tikv/pd/pkg/utils/syncutil"
"github.com/tikv/pd/pkg/utils/typeutil"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server/core/storelimit"
"github.com/tikv/pd/server/versioninfo"

"github.com/BurntSushi/toml"
"github.com/coreos/go-semver/semver"
Expand Down
2 changes: 1 addition & 1 deletion server/config/persist_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import (
"github.com/pingcap/log"
"github.com/tikv/pd/pkg/cache"
"github.com/tikv/pd/pkg/slice"
"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/pkg/utils/etcdutil"
"github.com/tikv/pd/pkg/utils/typeutil"
"github.com/tikv/pd/server/core"
"github.com/tikv/pd/server/core/storelimit"
"github.com/tikv/pd/server/storage/endpoint"
"go.etcd.io/etcd/clientv3"
)

Expand Down
2 changes: 1 addition & 1 deletion server/config/service_middleware_persist_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"sync/atomic"

"github.com/pingcap/failpoint"
"github.com/tikv/pd/server/storage/endpoint"
"github.com/tikv/pd/pkg/storage/endpoint"
)

// ServiceMiddlewarePersistOptions wraps all service middleware configurations that need to persist to storage and
Expand Down
2 changes: 1 addition & 1 deletion server/core/region_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/kvproto/pkg/pdpb"
"github.com/stretchr/testify/require"
"github.com/tikv/pd/pkg/id"
"github.com/tikv/pd/pkg/mock/mockid"
"github.com/tikv/pd/server/id"
)

func TestNeedMerge(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/gc/safepoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"math"
"time"

"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/pkg/utils/syncutil"
"github.com/tikv/pd/server/storage/endpoint"
)

// SafePointManager is the manager for safePoint of GC and services.
Expand Down
2 changes: 1 addition & 1 deletion server/gc/safepoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"time"

"github.com/stretchr/testify/require"
"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/pkg/storage/kv"
"github.com/tikv/pd/server/storage/endpoint"
)

func newGCStorage() endpoint.GCSafePointStorage {
Expand Down
4 changes: 2 additions & 2 deletions server/grpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ import (
"github.com/pingcap/kvproto/pkg/pdpb"
"github.com/pingcap/log"
"github.com/tikv/pd/pkg/errs"
"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/pkg/storage/kv"
"github.com/tikv/pd/pkg/utils/grpcutil"
"github.com/tikv/pd/pkg/utils/logutil"
"github.com/tikv/pd/pkg/utils/tsoutil"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server/cluster"
"github.com/tikv/pd/server/core"
"github.com/tikv/pd/server/storage/endpoint"
"github.com/tikv/pd/server/tso"
"github.com/tikv/pd/server/versioninfo"
"go.etcd.io/etcd/clientv3"
"go.uber.org/zap"
"google.golang.org/grpc"
Expand Down
4 changes: 2 additions & 2 deletions server/keyspace/keyspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (

"github.com/pingcap/errors"
"github.com/pingcap/kvproto/pkg/keyspacepb"
"github.com/tikv/pd/pkg/id"
"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/pkg/utils/syncutil"
"github.com/tikv/pd/server/id"
"github.com/tikv/pd/server/storage/endpoint"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion server/keyspace/keyspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"github.com/pingcap/kvproto/pkg/keyspacepb"
"github.com/stretchr/testify/require"
"github.com/tikv/pd/pkg/mock/mockid"
"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/pkg/storage/kv"
"github.com/tikv/pd/server/storage/endpoint"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion server/keyspace_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"github.com/gogo/protobuf/proto"
"github.com/pingcap/kvproto/pkg/keyspacepb"
"github.com/pingcap/kvproto/pkg/pdpb"
"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/server/keyspace"
"github.com/tikv/pd/server/storage/endpoint"
"go.etcd.io/etcd/clientv3"
)

Expand Down
2 changes: 1 addition & 1 deletion server/replication/replication_mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ import (
"github.com/pingcap/log"
"github.com/tikv/pd/pkg/errs"
"github.com/tikv/pd/pkg/slice"
"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/pkg/utils/logutil"
"github.com/tikv/pd/pkg/utils/syncutil"
"github.com/tikv/pd/server/config"
"github.com/tikv/pd/server/core"
"github.com/tikv/pd/server/schedule"
"github.com/tikv/pd/server/storage/endpoint"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion server/schedule/checker/learner_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/stretchr/testify/require"
"github.com/tikv/pd/pkg/mock/mockcluster"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server/config"
"github.com/tikv/pd/server/core"
"github.com/tikv/pd/server/schedule/operator"
"github.com/tikv/pd/server/versioninfo"
)

func TestPromoteLearner(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/schedule/checker/merge_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/stretchr/testify/suite"
"github.com/tikv/pd/pkg/mock/mockcluster"
"github.com/tikv/pd/pkg/utils/testutil"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server/config"
"github.com/tikv/pd/server/core"
"github.com/tikv/pd/server/core/storelimit"
Expand All @@ -32,7 +33,6 @@ import (
"github.com/tikv/pd/server/schedule/labeler"
"github.com/tikv/pd/server/schedule/operator"
"github.com/tikv/pd/server/schedule/placement"
"github.com/tikv/pd/server/versioninfo"
"go.uber.org/goleak"
)

Expand Down
2 changes: 1 addition & 1 deletion server/schedule/checker/replica_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import (
"github.com/tikv/pd/pkg/cache"
"github.com/tikv/pd/pkg/mock/mockcluster"
"github.com/tikv/pd/pkg/utils/testutil"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server/config"
"github.com/tikv/pd/server/core"
"github.com/tikv/pd/server/schedule/operator"
"github.com/tikv/pd/server/versioninfo"
)

type replicaCheckerTestSuite struct {
Expand Down
2 changes: 1 addition & 1 deletion server/schedule/checker/rule_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import (
"github.com/pingcap/log"
"github.com/tikv/pd/pkg/cache"
"github.com/tikv/pd/pkg/errs"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server/core"
"github.com/tikv/pd/server/schedule"
"github.com/tikv/pd/server/schedule/filter"
"github.com/tikv/pd/server/schedule/operator"
"github.com/tikv/pd/server/schedule/placement"
"github.com/tikv/pd/server/versioninfo"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion server/schedule/checker/rule_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import (
"github.com/tikv/pd/pkg/errs"
"github.com/tikv/pd/pkg/mock/mockcluster"
"github.com/tikv/pd/pkg/utils/testutil"
"github.com/tikv/pd/pkg/versioninfo"
"github.com/tikv/pd/server/config"
"github.com/tikv/pd/server/core"
"github.com/tikv/pd/server/schedule/operator"
"github.com/tikv/pd/server/schedule/placement"
"github.com/tikv/pd/server/versioninfo"
)

func TestRuleCheckerTestSuite(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion server/schedule/labeler/labeler.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (

"github.com/pingcap/log"
"github.com/tikv/pd/pkg/errs"
"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/pkg/utils/syncutil"
"github.com/tikv/pd/server/core"
"github.com/tikv/pd/server/schedule/rangelist"
"github.com/tikv/pd/server/storage/endpoint"
"go.uber.org/zap"
)

Expand Down
Loading

0 comments on commit b4df235

Please sign in to comment.