From 61f079b554fbcf2a2c3042749dc4375f76e5235e Mon Sep 17 00:00:00 2001 From: JmPotato Date: Tue, 19 Mar 2024 15:17:02 +0800 Subject: [PATCH] Upgrade PD client to fix the TSO hang bug Signed-off-by: JmPotato --- go.mod | 2 +- go.sum | 4 ++-- integration_tests/go.mod | 9 +++------ integration_tests/go.sum | 4 ++-- integration_tests/split_test.go | 2 +- internal/mockstore/mocktikv/pd.go | 2 +- 6 files changed, 10 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index cf05ac3e4a..37b48da1a1 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/prometheus/client_model v0.5.0 github.com/stretchr/testify v1.8.2 github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a - github.com/tikv/pd/client v0.0.0-20240229062430-b207e514ece1 + github.com/tikv/pd/client v0.0.0-20240319071242-d3b94c97c12b github.com/twmb/murmur3 v1.1.3 go.etcd.io/etcd/api/v3 v3.5.10 go.etcd.io/etcd/client/v3 v3.5.10 diff --git a/go.sum b/go.sum index dee7498f9c..4c63de28f3 100644 --- a/go.sum +++ b/go.sum @@ -111,8 +111,8 @@ github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= 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= -github.com/tikv/pd/client v0.0.0-20240229062430-b207e514ece1 h1:KKa2bxKHhM+CmLn5Pp2VmNfi9AN2pWd+3m2EWnicdvE= -github.com/tikv/pd/client v0.0.0-20240229062430-b207e514ece1/go.mod h1:Z/QAgOt29zvwBTd0H6pdx45VO6KRNc/O/DzGkVmSyZg= +github.com/tikv/pd/client v0.0.0-20240319071242-d3b94c97c12b h1:LUeYme5++BRU4DSEi2BmdIki0dRki4dFt2/8IhmIXy4= +github.com/tikv/pd/client v0.0.0-20240319071242-d3b94c97c12b/go.mod h1:Z/QAgOt29zvwBTd0H6pdx45VO6KRNc/O/DzGkVmSyZg= github.com/twmb/murmur3 v1.1.3 h1:D83U0XYKcHRYwYIpBKf3Pks91Z0Byda/9SJ8B6EMRcA= github.com/twmb/murmur3 v1.1.3/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/integration_tests/go.mod b/integration_tests/go.mod index d0a3d39398..35bdc664d5 100644 --- a/integration_tests/go.mod +++ b/integration_tests/go.mod @@ -12,15 +12,10 @@ require ( github.com/stretchr/testify v1.9.0 github.com/tidwall/gjson v1.14.1 github.com/tikv/client-go/v2 v2.0.8-0.20240313022320-d59fea5757db - github.com/tikv/pd/client v0.0.0-20240229065730-92a31c12238e + github.com/tikv/pd/client v0.0.0-20240319071242-d3b94c97c12b go.uber.org/goleak v1.3.0 ) -require ( - github.com/dolthub/maphash v0.1.0 // indirect - github.com/dolthub/swiss v0.2.1 // indirect -) - require ( github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect github.com/BurntSushi/toml v1.3.2 // indirect @@ -42,6 +37,8 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/dolthub/maphash v0.1.0 // indirect + github.com/dolthub/swiss v0.2.1 // indirect github.com/go-asn1-ber/asn1-ber v1.5.4 // indirect github.com/go-ldap/ldap/v3 v3.4.4 // indirect github.com/go-ole/go-ole v1.3.0 // indirect diff --git a/integration_tests/go.sum b/integration_tests/go.sum index 51eb6c8908..923dcd4f00 100644 --- a/integration_tests/go.sum +++ b/integration_tests/go.sum @@ -527,8 +527,8 @@ github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tikv/pd/client v0.0.0-20240229065730-92a31c12238e h1:kHXMmskVCNyH53u43I73Y5cmZ6yqqder/jGOiI7ylxs= -github.com/tikv/pd/client v0.0.0-20240229065730-92a31c12238e/go.mod h1:Z/QAgOt29zvwBTd0H6pdx45VO6KRNc/O/DzGkVmSyZg= +github.com/tikv/pd/client v0.0.0-20240319071242-d3b94c97c12b h1:LUeYme5++BRU4DSEi2BmdIki0dRki4dFt2/8IhmIXy4= +github.com/tikv/pd/client v0.0.0-20240319071242-d3b94c97c12b/go.mod h1:Z/QAgOt29zvwBTd0H6pdx45VO6KRNc/O/DzGkVmSyZg= github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= diff --git a/integration_tests/split_test.go b/integration_tests/split_test.go index a065aaae04..2f2d647e9e 100644 --- a/integration_tests/split_test.go +++ b/integration_tests/split_test.go @@ -285,7 +285,7 @@ func (c *mockPDClient) GetOperator(ctx context.Context, regionID uint64) (*pdpb. return &pdpb.GetOperatorResponse{Status: pdpb.OperatorStatus_SUCCESS}, nil } -func (c *mockPDClient) GetLeaderAddr() string { return "mockpd" } +func (c *mockPDClient) GetLeaderURL() string { return "mockpd" } func (c *mockPDClient) UpdateOption(option pd.DynamicOption, value interface{}) error { return nil diff --git a/internal/mockstore/mocktikv/pd.go b/internal/mockstore/mocktikv/pd.go index cbab4f3315..f80fd932e5 100644 --- a/internal/mockstore/mocktikv/pd.go +++ b/internal/mockstore/mocktikv/pd.go @@ -343,7 +343,7 @@ func (c *pdClient) GetAllMembers(ctx context.Context) ([]*pdpb.Member, error) { return nil, nil } -func (c *pdClient) GetLeaderAddr() string { return "mockpd" } +func (c *pdClient) GetLeaderURL() string { return "mockpd" } func (c *pdClient) UpdateOption(option pd.DynamicOption, value interface{}) error { return nil