From ca03df5652e45bf34c243587a1097afcf7cbc7ab 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 | 2 +- integration_tests/go.sum | 4 ++-- integration_tests/split_test.go | 4 ++++ internal/mockstore/mocktikv/pd.go | 2 ++ 6 files changed, 12 insertions(+), 6 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..b3660f9f41 100644 --- a/integration_tests/go.mod +++ b/integration_tests/go.mod @@ -12,7 +12,7 @@ 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 ) 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..7a8fcee6ac 100644 --- a/integration_tests/split_test.go +++ b/integration_tests/split_test.go @@ -394,3 +394,7 @@ func (c *mockPDClient) WatchGCSafePointV2(ctx context.Context, revision int64) ( func (c *mockPDClient) GetServiceDiscovery() pd.ServiceDiscovery { panic("unimplemented") } + +func (m *mockPDClient) GetLeaderURL() string { + panic("unimplemented") +} diff --git a/internal/mockstore/mocktikv/pd.go b/internal/mockstore/mocktikv/pd.go index cbab4f3315..148c1720df 100644 --- a/internal/mockstore/mocktikv/pd.go +++ b/internal/mockstore/mocktikv/pd.go @@ -426,3 +426,5 @@ func (m *pdClient) LoadResourceGroups(ctx context.Context) ([]*rmpb.ResourceGrou } func (m *pdClient) GetServiceDiscovery() pd.ServiceDiscovery { return nil } + +func (m *pdClient) GetLeaderURL() string { return "" }