Skip to content

Commit

Permalink
Merge branch 'release-5.0-rc' into release-5.0-rc-65e08e2b7de7
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Jan 5, 2021
2 parents b95c001 + 9efcf3a commit c5e4260
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/opentracing/opentracing-go v1.1.0
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d
github.com/pingcap-incubator/tidb-dashboard v0.0.0-20201126111827-6c8be2240067
github.com/pingcap-incubator/tidb-dashboard v0.0.0-20210104140916-41a0a3a87e75
github.com/pingcap/check v0.0.0-20200212061837-5e12011dc712
github.com/pingcap/errcode v0.3.0
github.com/pingcap/errors v0.11.5-0.20201126102027-b0a155152ca3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o=
github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d h1:U+PMnTlV2tu7RuMK5etusZG3Cf+rpow5hqQByeCzJ2g=
github.com/phf/go-queue v0.0.0-20170504031614-9abe38d0371d/go.mod h1:lXfE4PvvTW5xOjO6Mba8zDPyw8M93B6AQ7frTGnMlA8=
github.com/pingcap-incubator/tidb-dashboard v0.0.0-20201126111827-6c8be2240067 h1:hq1pTBUxx0Szt6vyM++KQR+kmxhTPDC5csJPRkQzxO8=
github.com/pingcap-incubator/tidb-dashboard v0.0.0-20201126111827-6c8be2240067/go.mod h1:EONGys2gM5n14pII2vjmU/5VG3Dtj6kpqUT1GUZ4ysw=
github.com/pingcap-incubator/tidb-dashboard v0.0.0-20210104140916-41a0a3a87e75 h1:XJ/OVqPtHuGNLgCu6xgSlCouz5roe3Yf3TXHjVNf+9w=
github.com/pingcap-incubator/tidb-dashboard v0.0.0-20210104140916-41a0a3a87e75/go.mod h1:EONGys2gM5n14pII2vjmU/5VG3Dtj6kpqUT1GUZ4ysw=
github.com/pingcap/check v0.0.0-20190102082844-67f458068fc8/go.mod h1:B1+S9LNcuMyLH/4HMTViQOJevkGiik3wW2AN9zb2fNQ=
github.com/pingcap/check v0.0.0-20191107115940-caf2b9e6ccf4/go.mod h1:PYMCGwN0JHjoqGr3HrZoD+b8Tgx8bKnArhSq8YVzUMc=
github.com/pingcap/check v0.0.0-20191216031241-8a5a85928f12/go.mod h1:PYMCGwN0JHjoqGr3HrZoD+b8Tgx8bKnArhSq8YVzUMc=
Expand Down
11 changes: 8 additions & 3 deletions server/cluster/coordinator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -970,21 +970,26 @@ func (s *testOperatorControllerSuite) TestStoreOverloaded(c *C) {
c.Assert(tc.addLeaderRegion(1, 2, 3, 4), IsNil)
region := tc.GetRegion(1).Clone(core.SetApproximateSize(60))
tc.putRegion(region)
start := time.Now()
{
op1 := lb.Schedule(tc)[0]
c.Assert(op1, NotNil)
c.Assert(oc.AddOperator(op1), IsTrue)
c.Assert(oc.RemoveOperator(op1), IsTrue)
}
for i := 0; i < 10; i++ {
c.Assert(lb.Schedule(tc), IsNil)
for {
time.Sleep(time.Millisecond * 10)
ops := lb.Schedule(tc)
if time.Since(start) > time.Second {
break
}
c.Assert(ops, IsNil)
}

// reset all stores' limit
// scheduling one time needs 1/10 seconds
opt.SetAllStoresLimit(storelimit.AddPeer, 600)
opt.SetAllStoresLimit(storelimit.RemovePeer, 600)
time.Sleep(1 * time.Second)
for i := 0; i < 10; i++ {
op1 := lb.Schedule(tc)[0]
c.Assert(op1, NotNil)
Expand Down

0 comments on commit c5e4260

Please sign in to comment.