diff --git a/DEPS.bzl b/DEPS.bzl index 5b2cd1cc5aeaf..3733a3a3dcb05 100644 --- a/DEPS.bzl +++ b/DEPS.bzl @@ -7193,13 +7193,13 @@ def go_deps(): name = "com_github_tikv_pd_client", build_file_proto_mode = "disable_global", importpath = "github.com/tikv/pd/client", - sha256 = "107218d0f9404ed51c23fda05b4fdac1bd3dbe8c8724c63ceddb4cbc7e77ceaf", - strip_prefix = "github.com/tikv/pd/client@v0.0.0-20240620115049-049de1761e56", + sha256 = "af957cdaccb24818d126f992ff3677b04adb2e80b53b898d5bab6f134a144120", + strip_prefix = "github.com/tikv/pd/client@v0.0.0-20240703065657-6b25787aff4d", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240620115049-049de1761e56.zip", - "http://ats.apps.svc/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240620115049-049de1761e56.zip", - "https://cache.hawkingrei.com/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240620115049-049de1761e56.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240620115049-049de1761e56.zip", + "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", ], ) go_repository( diff --git a/go.mod b/go.mod index fdc8a3260d122..2c57477a72c28 100644 --- a/go.mod +++ b/go.mod @@ -109,7 +109,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.20240703095801-d73cc1ed6503 - github.com/tikv/pd/client v0.0.0-20240620115049-049de1761e56 + github.com/tikv/pd/client v0.0.0-20240703065657-6b25787aff4d 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 475c81b3f0af3..6b8b55ab1089d 100644 --- a/go.sum +++ b/go.sum @@ -854,8 +854,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.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-20240620115049-049de1761e56 h1:7TLLfwrKoty9UeJMsSopRTXYw8ooxcF0Z1fegXhIgks= -github.com/tikv/pd/client v0.0.0-20240620115049-049de1761e56/go.mod h1:EHHidLItrJGh0jqfdfFhIHG5vwkR8+43tFnp7v7iv1Q= +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= 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)