Skip to content

Commit

Permalink
[cherry-pick] mod: update the pd client (#54457)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolouch committed Jul 5, 2024
1 parent 3c02c2a commit 387f691
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
12 changes: 6 additions & 6 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7054,13 +7054,13 @@ def go_deps():
name = "com_github_tikv_pd_client",
build_file_proto_mode = "disable_global",
importpath = "github.com/tikv/pd/client",
sha256 = "52835e32218c5458c33836b794f73d2bb0ad37576d4550c85044c52cdb84e434",
strip_prefix = "github.com/tikv/pd/client@v0.0.0-20240528122050-634e05a87ee0",
sha256 = "155b37d1252adebec8c9bfeb994c46f5eee6718aa3763bbc49b967862b0a1445",
strip_prefix = "github.com/tikv/pd/client@v0.0.0-20240704100006-173c2e199421",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240528122050-634e05a87ee0.zip",
"http://ats.apps.svc/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240528122050-634e05a87ee0.zip",
"https://cache.hawkingrei.com/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240528122050-634e05a87ee0.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240528122050-634e05a87ee0.zip",
"http://bazel-cache.pingcap.net:8080/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240704100006-173c2e199421.zip",
"http://ats.apps.svc/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240704100006-173c2e199421.zip",
"https://cache.hawkingrei.com/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240704100006-173c2e199421.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240704100006-173c2e199421.zip",
],
)
go_repository(
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ require (
github.com/tdakkota/asciicheck v0.2.0
github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2
github.com/tikv/client-go/v2 v2.0.8-0.20240531122021-7a74511a5241
github.com/tikv/pd/client v0.0.0-20240528122050-634e05a87ee0
github.com/tikv/pd/client v0.0.0-20240704100006-173c2e199421
github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966
github.com/twmb/murmur3 v1.1.6
github.com/uber/jaeger-client-go v2.22.1+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -995,8 +995,8 @@ github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a h1:J/YdBZ46WKpXsxsW
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a/go.mod h1:h4xBhSNtOeEosLJ4P7JyKXX7Cabg7AVkWCK5gV2vOrM=
github.com/tikv/client-go/v2 v2.0.8-0.20240531122021-7a74511a5241 h1:iwqchfXkd1pfUDSnCKxXAeaR7FzyHA+yRdr5PtTwvvg=
github.com/tikv/client-go/v2 v2.0.8-0.20240531122021-7a74511a5241/go.mod h1:37p0ryKaieJbBpVDWnaPi2ZS6UFqkgpsemBLkGX2FvM=
github.com/tikv/pd/client v0.0.0-20240528122050-634e05a87ee0 h1:7Pn6IykTelkKVhdzj2kbrYxj8DTModJt+U+7HTeIb54=
github.com/tikv/pd/client v0.0.0-20240528122050-634e05a87ee0/go.mod h1:AwjTSpM7CgAynYwB6qTG5R5fVC9/eXlQXiTO6zDL1HI=
github.com/tikv/pd/client v0.0.0-20240704100006-173c2e199421 h1:KBc69gm3RYpHfUAIUxvxgTAq0RIKP90PRi9pikg/FRY=
github.com/tikv/pd/client v0.0.0-20240704100006-173c2e199421/go.mod h1:AwjTSpM7CgAynYwB6qTG5R5fVC9/eXlQXiTO6zDL1HI=
github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M=
github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ=
github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs=
Expand Down
18 changes: 8 additions & 10 deletions pkg/executor/internal/calibrateresource/calibrate_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,15 @@ func TestCalibrateResource(t *testing.T) {
defer func() {
do.SetResourceGroupsController(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

0 comments on commit 387f691

Please sign in to comment.