cloudstorage: fix a bug that may cause changefeed getting stuck#1238
Conversation
There was a problem hiding this comment.
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
cmd/storage-consumer/main.go:182
- Inconsistent use of external storage instantiation functions detected. Ensure that a single API (preferably the timeout-aware version) is used across components to maintain consistent behavior.
storage, err := putil.GetExternalStorageFromURI(ctx, upstreamURIStr)
| return nil, errors.Trace(err) | ||
| } | ||
| storage, err := helper.GetExternalStorageFromURI(ctx, sinkURI.String()) | ||
| storage, err := putil.GetExternalStorageFromURI(ctx, sinkURI.String()) |
There was a problem hiding this comment.
This test uses GetExternalStorageFromURI while other parts of the system use a timeout-aware function. Standardize the external storage creation method to ensure uniform behavior.
| storage, err := putil.GetExternalStorageFromURI(ctx, sinkURI.String()) | |
| timeoutCtx, cancel := context.WithTimeout(ctx, 30*time.Second) | |
| defer cancel() | |
| storage, err := putil.GetExternalStorageFromURIWithTimeout(timeoutCtx, sinkURI.String()) |
|
Should we use |
Good idea. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wk989898 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
|
/retest |
|
@asddongmen: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: close #1239
What is changed and how it works?
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note