Skip to content

Commit

Permalink
[new-hotspot-scheduler] merge master (#1752)
Browse files Browse the repository at this point in the history
* *: unify get store function everywhere (#1671)

Signed-off-by: Ryan Leung <rleungx@gmail.com>

*  server: use leader lease to determine tso service validity (#1676)

Signed-off-by: disksing <i@disksing.com>

* test: fix tests (#1696)

* test: fix region syncer test

Signed-off-by: disksing <i@disksing.com>

* add config-check flag for pd-server (#1695)

Signed-off-by: cwen0 <cwenyin0@gmail.com>

* operator: rewrite move region related functions (#1667)

* *: support setting endKey for ScanRange (#1700)

Signed-off-by: disksing <i@disksing.com>

* *: reduce some unnecessary parameters (#1698)

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* schedule: Do not send an operator of a region wth a stale epoch (#1659)

* schedule: Do not send an operator of a region wth a stale epoch

Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>

* schedule: check the version changed by the operator self

Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>

* schedule: fix unit test

Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>

* schedule: fix to avoid dispatching a stale opstep

Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>

* dispatch: refactor "ConsumeConfVer() int" to "ExpectConfVerChange() bool"

Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>

* dispatch: fix typo in comment

Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>

* fix typo

Co-Authored-By: Ryan Leung <rleungx@gmail.com>

* dispatch: fix unittest

Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>

* dispatch: refine format

Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>

* server: fix the dead lock in scatter region (#1706)

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* tools: fix set namespace in pd-ctl (#1701)

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* tools: fix parse url without http prefix (#1703)

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* tests: support deadlock detection in make test (#1704)

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* Makefile: fix failpoint enable (#1722)

Signed-off-by: nolouch <nolouch@gmail.com>

* checker: fix the issue that a region does not merge to the sibling with smaller size (#1723)

Signed-off-by: disksing <i@disksing.com>

* tools: balance region simulator (#1708)

* scheduler: do not remove the operator when the step does not finish (#1715)

Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>

* operator: fix the AddLearner config version judgment (#1732)

Signed-off-by: nolouch <nolouch@gmail.com>

* tools: fix TLS in pd control (#1729)

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* syncer: support TLS for region syncer (#1728)

Signed-off-by: Ryan Leung <rleungx@gmail.com>

* schedule: fix a thread-safe bug and improve code (#1719)

* statistics: fix region flow calculation (#1688)

Signed-off-by: jiyingtk <jiyingtk@mail.ustc.edu.cn>

* makefile: improve deadlock-enable/disable (#1736)

* api: fix missing keys statistic in region information (#1741)

Signed-off-by: nolouch <nolouch@gmail.com>

* *: update go version to 1.13 (#1742)

Signed-off-by: disksing <i@disksing.com>

* coordinator: add the operator cost time in log field (#1748)

Signed-off-by: nolouch <nolouch@gmail.com>
  • Loading branch information
Luffbee authored Sep 11, 2019
1 parent ecc0661 commit bcfcada
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ cache:
- $GOPATH/src/github.com/pingcap/pd/.retools

go:
- 1.12
- 1.13

script:
- make ci

matrix:
include:
- go: 1.12
- go: 1.13
install:
- go get github.com/mattn/goveralls
env:
Expand Down
21 changes: 13 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ OVERALLS := overalls
FAILPOINT_ENABLE := $$(find $$PWD/ -type d | grep -vE "(\.git|\.retools)" | xargs ./scripts/retool do failpoint-ctl enable)
FAILPOINT_DISABLE := $$(find $$PWD/ -type d | grep -vE "(\.git|\.retools)" | xargs ./scripts/retool do failpoint-ctl disable)

DEADLOCK_ENABLE := $$(find . -name "*.go" | grep -vE "(vendor|\.retools)" | xargs -n 1 sed -i.bak 's/sync.RWMutex/deadlock.RWMutex/' && \
find . -name "*.go" | grep -vE "(vendor|\.retools)" | xargs -n 1 sed -i.bak 's/sync.Mutex/deadlock.Mutex/' && \
find . -name "*.go" | grep -vE "(vendor|\.retools)" | xargs -n 1 ./scripts/retool do goimports -w)
DEADLOCK_DISABLE := $$(find . -name "*.go" | grep -vE "(vendor|\.retools)" | xargs -n 1 sed -i.bak 's/deadlock.RWMutex/sync.RWMutex/' && \
find . -name "*.go" | grep -vE "(vendor|\.retools)" | xargs -n 1 sed -i.bak 's/deadlock.Mutex/sync.Mutex/' && \
find . -name "*.go" | grep -vE "(vendor|\.retools)" | xargs -n 1 ./scripts/retool do goimports -w && \
find . -name "*.bak" | grep -vE "(vendor|\.retools)" | xargs rm)
DEADLOCK_ENABLE := $$(\
find . -name "*.go" | grep -vE "(vendor|\.retools)" \
| xargs -n 1 sed -i.bak 's/sync\.RWMutex/deadlock.RWMutex/;s/sync\.Mutex/deadlock.Mutex/' && \
find . -name "*.go" | grep -vE "(vendor|\.retools)" | xargs grep -lE "(deadlock\.RWMutex|deadlock\.Mutex)" \
| xargs ./scripts/retool do goimports -w)
DEADLOCK_DISABLE := $$(\
find . -name "*.go" | grep -vE "(vendor|\.retools)" \
| xargs -n 1 sed -i.bak 's/deadlock\.RWMutex/sync.RWMutex/;s/deadlock\.Mutex/sync.Mutex/' && \
find . -name "*.go" | grep -vE "(vendor|\.retools)" | xargs grep -lE "(sync\.RWMutex|sync\.Mutex)" \
| xargs ./scripts/retool do goimports -w && \
find . -name "*.bak" | grep -vE "(vendor|\.retools)" | xargs rm && \
go mod tidy)

LDFLAGS += -X "$(PD_PKG)/server.PDReleaseVersion=$(shell git describe --tags --dirty)"
LDFLAGS += -X "$(PD_PKG)/server.PDBuildTS=$(shell date -u '+%Y-%m-%d %I:%M:%S')"
Expand Down Expand Up @@ -62,7 +67,7 @@ pd-recover: export GO111MODULE=on
pd-recover:
CGO_ENABLED=0 go build -o bin/pd-recover tools/pd-recover/main.go

test: retool-setup
test: retool-setup deadlock-setup
# testing...
@$(DEADLOCK_ENABLE)
@$(FAILPOINT_ENABLE)
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
jobs:
build:
docker:
- image: golang:1.12
- image: golang:1.13
working_directory: /go/src/github.com/pingcap/pd
environment:
GOFLAGS: -p=8
Expand Down
7 changes: 6 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pingcap/pd

go 1.12
go 1.13

require (
github.com/BurntSushi/toml v0.3.1
Expand All @@ -24,6 +24,7 @@ require (
github.com/juju/ratelimit v1.0.1
github.com/kr/pretty v0.1.0 // indirect
github.com/mattn/go-shellwords v1.0.3
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/montanaflynn/stats v0.0.0-20151014174947-eeaced052adb
github.com/opentracing/opentracing-go v1.0.2
github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8
Expand All @@ -43,6 +44,10 @@ require (
github.com/urfave/negroni v0.3.0
go.etcd.io/etcd v0.0.0-20190320044326-77d4b742cdbf
go.uber.org/zap v1.9.1
golang.org/x/crypto v0.0.0-20190909091759-094676da4a83 // indirect
golang.org/x/net v0.0.0-20190909003024-a7b16738d86b // indirect
golang.org/x/sync v0.0.0-20190423024810-112230192c58 // indirect
golang.org/x/sys v0.0.0-20190909082730-f460065e899a // indirect
google.golang.org/grpc v1.14.0
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0
Expand Down
17 changes: 16 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ github.com/mattn/go-shellwords v1.0.3 h1:K/VxK7SZ+cvuPgFSLKi5QPI9Vr/ipOf4C1gN+nt
github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
github.com/matttproud/golang_protobuf_extensions v1.0.0 h1:YNOwxxSJzSUARoD9KRZLzM9Y858MNGCOACTvCW9TSAc=
github.com/matttproud/golang_protobuf_extensions v1.0.0/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/montanaflynn/stats v0.0.0-20151014174947-eeaced052adb h1:bsjNADsjHq0gjU7KO7zwoX5k3HtFdf6TDzB3ncl5iUs=
github.com/montanaflynn/stats v0.0.0-20151014174947-eeaced052adb/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q=
Expand Down Expand Up @@ -168,15 +170,28 @@ go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20180608092829-8ac0e0d97ce4 h1:wviDUSmtheHRBfoY8B9U8ELl2USoXi2YFwdGdpIIkzI=
golang.org/x/crypto v0.0.0-20180608092829-8ac0e0d97ce4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190909091759-094676da4a83 h1:mgAKeshyNqWKdENOnQsg+8dRTwZFIwFaO3HNl52sweA=
golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181005035420-146acd28ed58 h1:otZG8yDCO4LVps5+9bxOeNiCvgmOyt96J3roHTYs7oE=
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190909003024-a7b16738d86b h1:XfVGCX+0T4WOStkaOsJRllbsiImhB2jgVBGc9L0lPGc=
golang.org/x/net v0.0.0-20190909003024-a7b16738d86b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190909082730-f460065e899a h1:mIzbOulag9/gXacgxKlFVwpCOWSfBT3/pDyyCwGA9as=
golang.org/x/sys v0.0.0-20190909082730-f460065e899a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 h1:+DCIGbF/swA92ohVg0//6X2IVY3KZs6p9mix0ziNYJM=
Expand Down
2 changes: 2 additions & 0 deletions server/api/region.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ func NewRegionInfo(r *core.RegionInfo) *RegionInfo {
DownPeers: r.GetDownPeers(),
PendingPeers: r.GetPendingPeers(),
WrittenBytes: r.GetBytesWritten(),
WrittenKeys: r.GetKeysWritten(),
ReadBytes: r.GetBytesRead(),
ReadKeys: r.GetKeysRead(),
ApproximateSize: r.GetApproximateSize(),
ApproximateKeys: r.GetApproximateKeys(),
}
Expand Down
11 changes: 11 additions & 0 deletions server/api/region_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ func newTestRegionInfo(regionID, storeID uint64, start, end []byte, opts ...core
newOpts := []core.RegionCreateOption{
core.SetApproximateKeys(10),
core.SetApproximateSize(10),
core.SetWrittenBytes(100 * 1024 * 1024),
core.SetWrittenKeys(1 * 1024 * 1024),
core.SetReadBytes(200 * 1024 * 1024),
core.SetReadKeys(2 * 1024 * 1024),
}
newOpts = append(newOpts, opts...)
region := core.NewRegionInfo(metaRegion, leader, newOpts...)
Expand All @@ -74,9 +78,16 @@ func (s *testRegionSuite) TestRegion(c *C) {
mustRegionHeartbeat(c, s.svr, r)
url := fmt.Sprintf("%s/region/id/%d", s.urlPrefix, r.GetID())
r1 := &RegionInfo{}
r1m := make(map[string]interface{})
err := readJSONWithURL(url, r1)
c.Assert(err, IsNil)
c.Assert(r1, DeepEquals, NewRegionInfo(r))
err = readJSONWithURL(url, &r1m)
c.Assert(err, IsNil)
c.Assert(r1m["written_bytes"].(float64), Equals, float64(r.GetBytesWritten()))
c.Assert(r1m["written_keys"].(float64), Equals, float64(r.GetKeysWritten()))
c.Assert(r1m["read_bytes"].(float64), Equals, float64(r.GetBytesRead()))
c.Assert(r1m["read_keys"].(float64), Equals, float64(r.GetKeysRead()))

url = fmt.Sprintf("%s/region/key/%s", s.urlPrefix, "a")
r2 := &RegionInfo{}
Expand Down
14 changes: 14 additions & 0 deletions server/core/region_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ func SetWrittenBytes(v uint64) RegionCreateOption {
}
}

// SetWrittenKeys sets the written keys for the region.
func SetWrittenKeys(v uint64) RegionCreateOption {
return func(region *RegionInfo) {
region.writtenKeys = v
}
}

// WithRemoveStorePeer removes the specified peer for the region.
func WithRemoveStorePeer(storeID uint64) RegionCreateOption {
return func(region *RegionInfo) {
Expand All @@ -166,6 +173,13 @@ func SetReadBytes(v uint64) RegionCreateOption {
}
}

// SetReadKeys sets the read keys for the region.
func SetReadKeys(v uint64) RegionCreateOption {
return func(region *RegionInfo) {
region.readKeys = v
}
}

// SetApproximateSize sets the approximate size for the region.
func SetApproximateSize(v int64) RegionCreateOption {
return func(region *RegionInfo) {
Expand Down
8 changes: 4 additions & 4 deletions server/schedule/operator_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (oc *OperatorController) Dispatch(region *core.RegionInfo, source string) {
changes > uint64(op.ConfVerChanged(region)) {

if oc.RemoveOperator(op) {
log.Info("stale operator", zap.Uint64("region-id", region.GetID()),
log.Info("stale operator", zap.Uint64("region-id", region.GetID()), zap.Duration("takes", op.RunningTime()),
zap.Reflect("operator", op), zap.Uint64("diff", changes))
operatorCounter.WithLabelValues(op.Desc(), "stale").Inc()
op.SetDropTime(time.Now())
Expand All @@ -124,15 +124,15 @@ func (oc *OperatorController) Dispatch(region *core.RegionInfo, source string) {
return
}
if op.IsFinish() && oc.RemoveOperator(op) {
log.Info("operator finish", zap.Uint64("region-id", region.GetID()), zap.Reflect("operator", op))
log.Info("operator finish", zap.Uint64("region-id", region.GetID()), zap.Duration("takes", op.RunningTime()), zap.Reflect("operator", op))
operatorCounter.WithLabelValues(op.Desc(), "finish").Inc()
operatorDuration.WithLabelValues(op.Desc()).Observe(op.RunningTime().Seconds())
oc.pushHistory(op)
op.SetDropTime(time.Now())
oc.opRecords.Put(op, pdpb.OperatorStatus_SUCCESS)
oc.PromoteWaitingOperator()
} else if timeout && oc.RemoveOperator(op) {
log.Info("operator timeout", zap.Uint64("region-id", region.GetID()), zap.Reflect("operator", op))
log.Info("operator timeout", zap.Uint64("region-id", region.GetID()), zap.Duration("takes", op.RunningTime()), zap.Reflect("operator", op))
operatorCounter.WithLabelValues(op.Desc(), "timeout").Inc()
op.SetDropTime(time.Now())
oc.opRecords.Put(op, pdpb.OperatorStatus_TIMEOUT)
Expand Down Expand Up @@ -328,7 +328,7 @@ func (oc *OperatorController) addOperatorLocked(op *operator.Operator) bool {
// already.
if old, ok := oc.operators[regionID]; ok {
_ = oc.removeOperatorLocked(old)
log.Info("replace old operator", zap.Uint64("region-id", regionID), zap.Reflect("operator", old))
log.Info("replace old operator", zap.Uint64("region-id", regionID), zap.Duration("takes", old.RunningTime()), zap.Reflect("operator", old))
operatorCounter.WithLabelValues(old.Desc(), "replace").Inc()
old.SetDropTime(time.Now())
oc.opRecords.Put(old, pdpb.OperatorStatus_REPLACE)
Expand Down
25 changes: 18 additions & 7 deletions server/statistics/hot_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,6 @@ func (f *HotStoresStats) CheckRegionFlow(region *core.RegionInfo, kind FlowKind)
isExpiredInStore func(region *core.RegionInfo, storeID uint64) bool
)

reportInterval = region.GetInterval().GetEndTimestamp() - region.GetInterval().GetStartTimestamp()

// ignores this region flow information if the report time interval is too short or too long.
if reportInterval < minHotRegionReportInterval || reportInterval > 3*RegionHeartBeatReportInterval {
return generators
}

storeIDs := make(map[uint64]struct{})
// gets the storeIDs, including old region and new region
ids, ok := f.storesOfRegion[region.GetID()]
Expand Down Expand Up @@ -133,6 +126,24 @@ func (f *HotStoresStats) CheckRegionFlow(region *core.RegionInfo, kind FlowKind)
}
}

reportInterval = region.GetInterval().GetEndTimestamp() - region.GetInterval().GetStartTimestamp()

// ignores this region flow information if the report time interval is too short or too long.
if reportInterval < minHotRegionReportInterval || reportInterval > 3*RegionHeartBeatReportInterval {
for storeID := range storeIDs {
if isExpiredInStore(region, storeID) {
generator := &hotSpotPeerStatGenerator{
Region: region,
StoreID: storeID,
Kind: kind,
Expired: true,
}
generators = append(generators, generator)
}
}
return generators
}

bytesPerSec = uint64(float64(getBytesFlow()) / float64(reportInterval))
keysPerSec = uint64(float64(getKeysFlow()) / float64(reportInterval))
for storeID := range storeIDs {
Expand Down
1 change: 1 addition & 0 deletions tools/pd-analysis/analysis/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
result.txt
3 changes: 2 additions & 1 deletion tools/pd-analysis/analysis/transfer_region_counter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
package analysis

import (
. "github.com/pingcap/check"
"testing"

. "github.com/pingcap/check"
)

func TestCounter(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
package cases

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"
"go.uber.org/zap"
"time"
)

func newRedundantBalanceRegion() *Case {
Expand Down

0 comments on commit bcfcada

Please sign in to comment.