Skip to content

Commit 95374f0

Browse files
authored
*: fix go mod tidy (#4110)
1 parent ef90427 commit 95374f0

File tree

2 files changed

+0
-70
lines changed

2 files changed

+0
-70
lines changed

coordinator/coordinator_test.go

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -44,86 +44,18 @@ import (
4444
"github.com/pingcap/ticdc/server/watcher"
4545
"github.com/stretchr/testify/require"
4646
pd "github.com/tikv/pd/client"
47-
pdgc "github.com/tikv/pd/client/clients/gc"
4847
"go.uber.org/zap"
4948
"google.golang.org/grpc"
5049
)
5150

5251
type mockPdClient struct {
5352
pd.Client
54-
mu sync.Mutex
55-
gcClient map[uint32]*mockGCStatesClient
5653
}
5754

5855
func (m *mockPdClient) UpdateServiceGCSafePoint(ctx context.Context, serviceID string, ttl int64, safePoint uint64) (uint64, error) {
5956
return safePoint, nil
6057
}
6158

62-
func (m *mockPdClient) GetGCStatesClient(keyspaceID uint32) pdgc.GCStatesClient {
63-
m.mu.Lock()
64-
defer m.mu.Unlock()
65-
66-
if m.gcClient == nil {
67-
m.gcClient = make(map[uint32]*mockGCStatesClient)
68-
}
69-
if cli, ok := m.gcClient[keyspaceID]; ok {
70-
return cli
71-
}
72-
cli := newMockGCStatesClient(keyspaceID)
73-
m.gcClient[keyspaceID] = cli
74-
return cli
75-
}
76-
77-
type mockGCStatesClient struct {
78-
keyspaceID uint32
79-
80-
mu sync.Mutex
81-
barriers map[string]*pdgc.GCBarrierInfo
82-
}
83-
84-
func newMockGCStatesClient(keyspaceID uint32) *mockGCStatesClient {
85-
return &mockGCStatesClient{
86-
keyspaceID: keyspaceID,
87-
barriers: make(map[string]*pdgc.GCBarrierInfo),
88-
}
89-
}
90-
91-
func (c *mockGCStatesClient) SetGCBarrier(ctx context.Context, barrierID string, barrierTS uint64, ttl time.Duration) (*pdgc.GCBarrierInfo, error) {
92-
c.mu.Lock()
93-
defer c.mu.Unlock()
94-
95-
info := pdgc.NewGCBarrierInfo(barrierID, barrierTS, ttl, time.Now())
96-
c.barriers[barrierID] = info
97-
return info, nil
98-
}
99-
100-
func (c *mockGCStatesClient) DeleteGCBarrier(ctx context.Context, barrierID string) (*pdgc.GCBarrierInfo, error) {
101-
c.mu.Lock()
102-
defer c.mu.Unlock()
103-
104-
info, ok := c.barriers[barrierID]
105-
if ok {
106-
delete(c.barriers, barrierID)
107-
}
108-
return info, nil
109-
}
110-
111-
func (c *mockGCStatesClient) GetGCState(ctx context.Context) (pdgc.GCState, error) {
112-
c.mu.Lock()
113-
defer c.mu.Unlock()
114-
115-
barriers := make([]*pdgc.GCBarrierInfo, 0, len(c.barriers))
116-
for _, info := range c.barriers {
117-
barriers = append(barriers, info)
118-
}
119-
return pdgc.GCState{
120-
KeyspaceID: c.keyspaceID,
121-
TxnSafePoint: 0,
122-
GCSafePoint: 0,
123-
GCBarriers: barriers,
124-
}, nil
125-
}
126-
12759
type mockMaintainerManager struct {
12860
mc messaging.MessageCenter
12961
msgCh chan *messaging.TargetMessage

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,8 +1707,6 @@ github.com/pingcap/tidb-dashboard v0.0.0-20250928152019-e111aaee93f4 h1:cl2GYJ9e
17071707
github.com/pingcap/tidb-dashboard v0.0.0-20250928152019-e111aaee93f4/go.mod h1:iwv1jXwX18IKvkHvQI9JgQ+WnLPFc5DpIGRfM+mlYKk=
17081708
github.com/pingcap/tidb/pkg/parser v0.0.0-20241120103608-82376c7732c1 h1:kXonivqohILI2m1cB9xlTpMGUF7flZgU7qFoZn891Ws=
17091709
github.com/pingcap/tidb/pkg/parser v0.0.0-20241120103608-82376c7732c1/go.mod h1:Hju1TEWZvrctQKbztTRwXH7rd41Yq0Pgmq4PrEKcq7o=
1710-
github.com/pingcap/tiflow v0.0.0-20251216025638-62c10c0907dc h1:ceqF/CQbXQHagH2zafoJVA3ygqZbB4toDZyPxTByzIg=
1711-
github.com/pingcap/tiflow v0.0.0-20251216025638-62c10c0907dc/go.mod h1:IkKs8qcuqIfxCPFrtYvUx5YmraaLTsIIoD5D5p+xkaE=
17121710
github.com/pingcap/tiflow v0.0.0-20251226072601-0cb0aaf25061 h1:bzqYZY2vxn6kpOWCGWyXMwM8DcBwLqaNLw/UnZp2dGM=
17131711
github.com/pingcap/tiflow v0.0.0-20251226072601-0cb0aaf25061/go.mod h1:IkKs8qcuqIfxCPFrtYvUx5YmraaLTsIIoD5D5p+xkaE=
17141712
github.com/pingcap/tipb v0.0.0-20241022082558-0607513e7fa4 h1:wvaUybJT0fUReCDcFtV3CEvMuI9iu+G7IW72tbSlil4=

0 commit comments

Comments
 (0)