Skip to content

Commit

Permalink
Merge branch 'master' into hot_region
Browse files Browse the repository at this point in the history
  • Loading branch information
bufferflies authored Apr 10, 2023
2 parents 48e8258 + bfdc7ec commit 8c3359f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/pd_service_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (c *pdServiceDiscovery) updateMemberLoop() {
failpoint.Continue()
})
if err := c.updateMember(); err != nil {
log.Error("[pd] failed to update member", errs.ZapError(err))
log.Error("[pd] failed to update member", zap.Strings("urls", c.GetURLs()), errs.ZapError(err))
}
}
}
Expand Down Expand Up @@ -453,7 +453,7 @@ func (c *pdServiceDiscovery) updateMember() error {
// the error of `switchTSOAllocatorLeader` will be returned.
return errTSO
}
return errs.ErrClientGetMember.FastGenByArgs(c.GetURLs())
return errs.ErrClientGetMember.FastGenByArgs()
}

func (c *pdServiceDiscovery) getClusterInfo(ctx context.Context, url string, timeout time.Duration) (*pdpb.GetClusterInfoResponse, error) {
Expand Down
1 change: 1 addition & 0 deletions pkg/schedule/schedulers/hot_region_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,7 @@ func TestHotReadRegionScheduleByteRateOnly(t *testing.T) {
tc.RemoveRegion(r)
tc.RemoveRegionFromSubTree(r)
}
hb.updateReadTime = time.Now().Add(-time.Second)
hb.Schedule(tc, false)
re.Contains(hb.regionPendings, uint64(4))
re.True(typeutil.Float64Equal(509.0*units.KiB, hb.regionPendings[4].origin.Loads[statistics.RegionReadBytes]))
Expand Down
4 changes: 2 additions & 2 deletions tests/integrations/tso/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ func (suite *tsoServerTestSuite) TestConcurrentlyReset() {
for i := 0; i < 2; i++ {
go func() {
defer wg.Done()
for i := 0; i <= 100; i++ {
physical := now.Add(time.Duration(2*i)*time.Minute).UnixNano() / int64(time.Millisecond)
for j := 0; j <= 100; j++ {
physical := now.Add(time.Duration(2*j)*time.Minute).UnixNano() / int64(time.Millisecond)
ts := uint64(physical << 18)
suite.resetTS(ts, false, false)
}
Expand Down

0 comments on commit 8c3359f

Please sign in to comment.