From 8737e7d8559c6992a1f3af9d33ec024ff503e949 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Fri, 12 Jul 2024 19:14:56 +0800 Subject: [PATCH] mod: update pd client (#54424) (#54460) ref tikv/pd#8349, ref pingcap/tidb#47421 --- DEPS.bzl | 12 ++++++------ go.mod | 2 +- go.sum | 4 ++-- .../calibrate_resource_test.go | 18 ++++++++---------- 4 files changed, 17 insertions(+), 19 deletions(-) diff --git a/DEPS.bzl b/DEPS.bzl index 368b7d77ef3e3..1ddeac22ffaca 100644 --- a/DEPS.bzl +++ b/DEPS.bzl @@ -7080,13 +7080,13 @@ def go_deps(): name = "com_github_tikv_pd_client", build_file_proto_mode = "disable_global", importpath = "github.com/tikv/pd/client", - sha256 = "634cdbdda95680c4bc4c5fb16e1d70461e17a1584ff77362197e0ae41d66018e", - strip_prefix = "github.com/tikv/pd/client@v0.0.0-20240531082952-199b01792159", + sha256 = "289e42d456a8528576b83ba069a1f5b21cb2ae7599bce600db2afdc59be091c7", + strip_prefix = "github.com/tikv/pd/client@v0.0.0-20240708074802-cb8da1b1ad2f", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240531082952-199b01792159.zip", - "http://ats.apps.svc/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240531082952-199b01792159.zip", - "https://cache.hawkingrei.com/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240531082952-199b01792159.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240531082952-199b01792159.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240708074802-cb8da1b1ad2f.zip", + "http://ats.apps.svc/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240708074802-cb8da1b1ad2f.zip", + "https://cache.hawkingrei.com/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240708074802-cb8da1b1ad2f.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240708074802-cb8da1b1ad2f.zip", ], ) go_repository( diff --git a/go.mod b/go.mod index 63082c1d5b448..3fca735b45c0b 100644 --- a/go.mod +++ b/go.mod @@ -107,7 +107,7 @@ require ( github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2 github.com/tidwall/btree v1.7.0 github.com/tikv/client-go/v2 v2.0.8-0.20240516040321-776d981aab13 - github.com/tikv/pd/client v0.0.0-20240531082952-199b01792159 + github.com/tikv/pd/client v0.0.0-20240708074802-cb8da1b1ad2f github.com/timakin/bodyclose v0.0.0-20240125160201-f835fa56326a github.com/twmb/murmur3 v1.1.6 github.com/uber/jaeger-client-go v2.22.1+incompatible diff --git a/go.sum b/go.sum index de982d2385df1..1edd08a370fc1 100644 --- a/go.sum +++ b/go.sum @@ -869,8 +869,8 @@ 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.20240516040321-776d981aab13 h1:dZkRAhtwM5Kxw8ivo4m8RAmV7SCQ6hSR3PJWbCGWwdw= github.com/tikv/client-go/v2 v2.0.8-0.20240516040321-776d981aab13/go.mod h1:+vXk4Aex17GnI8gfSMPxrL0SQLbBYgP3Db4FvHiImwM= -github.com/tikv/pd/client v0.0.0-20240531082952-199b01792159 h1:JdeShNYbZ+1+g3qS4pdScPabibOiiZmUz6BDi8H1yUc= -github.com/tikv/pd/client v0.0.0-20240531082952-199b01792159/go.mod h1:kNRekhwXqjTjNHy+kPmbZvsMmvl42zOj/UW5IIG+nP0= +github.com/tikv/pd/client v0.0.0-20240708074802-cb8da1b1ad2f h1:PGQe9GxbdYJgXkosPxXuBmXYcYb+nt0ZovGeNStLsNM= +github.com/tikv/pd/client v0.0.0-20240708074802-cb8da1b1ad2f/go.mod h1:4HXfGoT4O+lOWfOqxOvsIca9v+sYRL/W35duf+rgRsY= github.com/timakin/bodyclose v0.0.0-20240125160201-f835fa56326a h1:A6uKudFIfAEpoPdaal3aSqGxBzLyU8TqyXImLwo6dIo= github.com/timakin/bodyclose v0.0.0-20240125160201-f835fa56326a/go.mod h1:mkjARE7Yr8qU23YcGMSALbIxTQ9r9QBVahQOBRfU460= github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= diff --git a/pkg/executor/internal/calibrateresource/calibrate_resource_test.go b/pkg/executor/internal/calibrateresource/calibrate_resource_test.go index c0030b004ca08..bb5d552f1e86f 100644 --- a/pkg/executor/internal/calibrateresource/calibrate_resource_test.go +++ b/pkg/executor/internal/calibrateresource/calibrate_resource_test.go @@ -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)