Skip to content

Commit

Permalink
This is an automated cherry-pick of #9771
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
sdojjy authored and ti-chi-bot committed Sep 26, 2023
1 parent b749474 commit 99f7c44
Show file tree
Hide file tree
Showing 14 changed files with 1,145 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cdc/kv/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,12 @@ func (c *CDCClient) newStream(ctx context.Context, addr string, storeID uint64)
return nil
}
if c.config.Debug.EnableKVConnectBackOff {
<<<<<<< HEAD
newStreamErr = retry.Do(ctx, streamFunc, retry.WithBackoffBaseDelay(500),
=======
newStreamErr = retry.Do(ctx, streamFunc,
retry.WithBackoffBaseDelay(100),
>>>>>>> 43848f2fb5 (kv(ticdc): remove backoff from newStream func (#9771))
retry.WithMaxTries(2),
retry.WithIsRetryableErr(cerror.IsRetryableError),
)
Expand Down
4 changes: 4 additions & 0 deletions cdc/kv/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3535,7 +3535,11 @@ func TestPrewriteNotMatchError(t *testing.T) {
func createFakeEventFeedSession() *eventFeedSession {
return newEventFeedSession(
&CDCClient{config: config.GetDefaultServerConfig()},
<<<<<<< HEAD
regionspan.ComparableSpan{Start: []byte("a"), End: []byte("b")},
=======
tablepb.Span{StartKey: []byte("a"), EndKey: []byte("b")},
>>>>>>> 43848f2fb5 (kv(ticdc): remove backoff from newStream func (#9771))
nil, /*lockResolver*/
100, /*startTs*/
nil, /*eventCh*/
Expand Down
5 changes: 5 additions & 0 deletions cdc/kv/region_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,13 @@ func newRegionWorker(
rtsManager: newRegionTsManager(),
rtsUpdateCh: make(chan *rtsUpdateEvent, 1024),
storeAddr: addr,
<<<<<<< HEAD
concurrency: s.client.config.KVClient.WorkerConcurrent,
metrics: metrics,
=======
concurrency: int(s.client.config.KVClient.WorkerConcurrent),
metrics: newRegionWorkerMetrics(changefeedID),
>>>>>>> 43848f2fb5 (kv(ticdc): remove backoff from newStream func (#9771))
inputPending: 0,
}
}
Expand Down
Loading

0 comments on commit 99f7c44

Please sign in to comment.