Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#54424
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
nolouch authored and ti-chi-bot committed Jul 4, 2024
1 parent 660aebc commit fa28b16
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 10 deletions.
11 changes: 11 additions & 0 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4194,8 +4194,19 @@ def go_deps():
name = "com_github_tikv_pd_client",
build_file_proto_mode = "disable_global",
importpath = "github.com/tikv/pd/client",
<<<<<<< HEAD
sum = "h1:BBwUZAaBl7DKdyaduOxXqias4xCtdDgIAGsDBuri3lg=",
version = "v0.0.0-20231211083919-fe6fd1721aa6",
=======
sha256 = "af957cdaccb24818d126f992ff3677b04adb2e80b53b898d5bab6f134a144120",
strip_prefix = "github.com/tikv/pd/[email protected]",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240703065657-6b25787aff4d.zip",
"http://ats.apps.svc/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240703065657-6b25787aff4d.zip",
"https://cache.hawkingrei.com/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240703065657-6b25787aff4d.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240703065657-6b25787aff4d.zip",
],
>>>>>>> 9f7441a9794 (mod: update pd client (#54424))
)
go_repository(
name = "com_github_timakin_bodyclose",
Expand Down
18 changes: 8 additions & 10 deletions executor/calibrate_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,15 @@ func TestCalibrateResource(t *testing.T) {
defer func() {
executor.SetResourceGroupController(oldResourceCtl)
}()

// changed in 7.5 (ref https://github.com/tikv/pd/pull/6538), but for test pass, use the old config
oldCfg := rmclient.DefaultConfig()
oldCfg.RequestUnit.ReadBaseCost = 0.25
oldCfg.RequestUnit.ReadCostPerByte = 0.0000152587890625
oldCfg.RequestUnit.WriteBaseCost = 1.0
oldCfg.RequestUnit.WriteCostPerByte = 0.0009765625
oldCfg.RequestUnit.CPUMsCost = 0.3333333333333333
mockPrivider := &mockResourceGroupProvider{
cfg: rmclient.Config{
RequestUnit: rmclient.RequestUnitConfig{
ReadBaseCost: 0.25,
ReadCostPerByte: 0.0000152587890625,
WriteBaseCost: 1.0,
WriteCostPerByte: 0.0009765625,
CPUMsCost: 0.3333333333333333,
},
},
cfg: *oldCfg,
}
resourceCtl, err := rmclient.NewResourceGroupController(context.Background(), 1, mockPrivider, nil)
require.NoError(t, err)
Expand Down
7 changes: 7 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,16 @@ require (
github.com/stretchr/testify v1.8.2
github.com/tdakkota/asciicheck v0.2.0
github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2
<<<<<<< HEAD
github.com/tikv/client-go/v2 v2.0.8-0.20240510070118-c6d7a483b5e1
github.com/tikv/pd/client v0.0.0-20231211083919-fe6fd1721aa6
github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e
=======
github.com/tidwall/btree v1.7.0
github.com/tikv/client-go/v2 v2.0.8-0.20240703095801-d73cc1ed6503
github.com/tikv/pd/client v0.0.0-20240703065657-6b25787aff4d
github.com/timakin/bodyclose v0.0.0-20240125160201-f835fa56326a
>>>>>>> 9f7441a9794 (mod: update pd client (#54424))
github.com/twmb/murmur3 v1.1.6
github.com/uber/jaeger-client-go v2.22.1+incompatible
github.com/vbauerster/mpb/v7 v7.5.3
Expand Down
11 changes: 11 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -967,12 +967,23 @@ github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2 h1:mbAskLJ0oJf
github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2/go.mod h1:2PfKggNGDuadAa0LElHrByyrz4JPZ9fFx6Gs7nx7ZZU=
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a h1:J/YdBZ46WKpXsxsW93SG+q0F8KI+yFrcIDT4c/RNoc4=
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a/go.mod h1:h4xBhSNtOeEosLJ4P7JyKXX7Cabg7AVkWCK5gV2vOrM=
<<<<<<< HEAD
github.com/tikv/client-go/v2 v2.0.8-0.20240510070118-c6d7a483b5e1 h1:NRAYutV0XCtLXVb414GXAShPmrfOQucbGgDHHuucTww=
github.com/tikv/client-go/v2 v2.0.8-0.20240510070118-c6d7a483b5e1/go.mod h1:45NuHB8x+VAoztMIjF6hEgXvPQXhXWPfMxDg0N8CoRY=
github.com/tikv/pd/client v0.0.0-20231211083919-fe6fd1721aa6 h1:BBwUZAaBl7DKdyaduOxXqias4xCtdDgIAGsDBuri3lg=
github.com/tikv/pd/client v0.0.0-20231211083919-fe6fd1721aa6/go.mod h1:8XEP9aqUvvc9guWJZ7vo0av0H6QsJtjIrOmLAQlL2Jo=
github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e h1:MV6KaVu/hzByHP0UvJ4HcMGE/8a6A4Rggc/0wx2AvJo=
github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ=
=======
github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI=
github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY=
github.com/tikv/client-go/v2 v2.0.8-0.20240703095801-d73cc1ed6503 h1:0mUlg3+dA5LvwKs1U6i/ID/8RsYgLVLGyM8fSBMb630=
github.com/tikv/client-go/v2 v2.0.8-0.20240703095801-d73cc1ed6503/go.mod h1:4HDOAx8OXAJPtqhCZ03IhChXgaFs4B3+vSrPWmiPxjg=
github.com/tikv/pd/client v0.0.0-20240703065657-6b25787aff4d h1:iTvGLERJltVzl/+W2e2nIpLgmymzMXK4VJW/HVl15ps=
github.com/tikv/pd/client v0.0.0-20240703065657-6b25787aff4d/go.mod h1:EHHidLItrJGh0jqfdfFhIHG5vwkR8+43tFnp7v7iv1Q=
github.com/timakin/bodyclose v0.0.0-20240125160201-f835fa56326a h1:A6uKudFIfAEpoPdaal3aSqGxBzLyU8TqyXImLwo6dIo=
github.com/timakin/bodyclose v0.0.0-20240125160201-f835fa56326a/go.mod h1:mkjARE7Yr8qU23YcGMSALbIxTQ9r9QBVahQOBRfU460=
>>>>>>> 9f7441a9794 (mod: update pd client (#54424))
github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs=
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
Expand Down

0 comments on commit fa28b16

Please sign in to comment.