From f8532d5e696b9506fb706f15c1bf508c417976ef Mon Sep 17 00:00:00 2001 From: ShuNing Date: Fri, 5 Jul 2024 00:05:57 +0800 Subject: [PATCH 1/2] This is an automated cherry-pick of #54424 Signed-off-by: ti-chi-bot --- DEPS.bzl | 10 ++++++++++ go.mod | 7 +++++++ go.sum | 11 +++++++++++ .../calibrate_resource_test.go | 18 ++++++++---------- 4 files changed, 36 insertions(+), 10 deletions(-) diff --git a/DEPS.bzl b/DEPS.bzl index a2365ba69a2c7..05edf3ea0ab85 100644 --- a/DEPS.bzl +++ b/DEPS.bzl @@ -7054,6 +7054,7 @@ def go_deps(): name = "com_github_tikv_pd_client", build_file_proto_mode = "disable_global", importpath = "github.com/tikv/pd/client", +<<<<<<< HEAD sha256 = "52835e32218c5458c33836b794f73d2bb0ad37576d4550c85044c52cdb84e434", strip_prefix = "github.com/tikv/pd/client@v0.0.0-20240528122050-634e05a87ee0", urls = [ @@ -7061,6 +7062,15 @@ def go_deps(): "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", +======= + 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-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( diff --git a/go.mod b/go.mod index c4063ebce5d8e..67aa925f917fb 100644 --- a/go.mod +++ b/go.mod @@ -104,9 +104,16 @@ require ( github.com/stretchr/testify v1.8.4 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.20240531122021-7a74511a5241 github.com/tikv/pd/client v0.0.0-20240528122050-634e05a87ee0 github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 +======= + 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 diff --git a/go.sum b/go.sum index 2dd67b631efa8..400fb7cec5790 100644 --- a/go.sum +++ b/go.sum @@ -993,12 +993,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.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/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/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= diff --git a/pkg/executor/internal/calibrateresource/calibrate_resource_test.go b/pkg/executor/internal/calibrateresource/calibrate_resource_test.go index 76a00db6d2e6c..df3df18b3c64d 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) From 5f102715b23bc2069cfdb9c3821dc18feeb7dc4a Mon Sep 17 00:00:00 2001 From: nolouch Date: Mon, 8 Jul 2024 16:03:45 +0800 Subject: [PATCH 2/2] mod: update the pd client Signed-off-by: nolouch --- DEPS.bzl | 24 +++++++----------------- go.mod | 9 +-------- go.sum | 15 ++------------- 3 files changed, 10 insertions(+), 38 deletions(-) diff --git a/DEPS.bzl b/DEPS.bzl index 05edf3ea0ab85..36756caa1781b 100644 --- a/DEPS.bzl +++ b/DEPS.bzl @@ -7054,23 +7054,13 @@ def go_deps(): name = "com_github_tikv_pd_client", build_file_proto_mode = "disable_global", importpath = "github.com/tikv/pd/client", -<<<<<<< HEAD - sha256 = "52835e32218c5458c33836b794f73d2bb0ad37576d4550c85044c52cdb84e434", - strip_prefix = "github.com/tikv/pd/client@v0.0.0-20240528122050-634e05a87ee0", - 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", -======= - 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-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)) + sha256 = "7b1346a47b79a75a8963902556c2c0772309224bba887fa486877836d79d44b9", + strip_prefix = "github.com/tikv/pd/client@v0.0.0-20240708075403-19f65c59bb89", + urls = [ + "http://bazel-cache.pingcap.net:8080/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240708075403-19f65c59bb89.zip", + "http://ats.apps.svc/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240708075403-19f65c59bb89.zip", + "https://cache.hawkingrei.com/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240708075403-19f65c59bb89.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20240708075403-19f65c59bb89.zip", ], ) go_repository( diff --git a/go.mod b/go.mod index 67aa925f917fb..3a0e39b5d3636 100644 --- a/go.mod +++ b/go.mod @@ -104,16 +104,9 @@ require ( github.com/stretchr/testify v1.8.4 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.20240531122021-7a74511a5241 - github.com/tikv/pd/client v0.0.0-20240528122050-634e05a87ee0 + github.com/tikv/pd/client v0.0.0-20240708075403-19f65c59bb89 github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 -======= - 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 diff --git a/go.sum b/go.sum index 400fb7cec5790..00d956410d147 100644 --- a/go.sum +++ b/go.sum @@ -993,23 +993,12 @@ 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.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-20240708075403-19f65c59bb89 h1:wkZLrptJ7T+EZ4JjLfvmHfV5yXnPP9x/fooQ1ok6DuE= +github.com/tikv/pd/client v0.0.0-20240708075403-19f65c59bb89/go.mod h1:NW6Af689Jw1FDxjq+WL0nqOdmQ1XT0ly2R1SIKfQuUw= 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/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=