Skip to content

Commit

Permalink
redo(ticdc): return ErrStorageInitialize if the external storage init…
Browse files Browse the repository at this point in the history
…ialization fails (#10745)

close #10710
  • Loading branch information
CharlesCheung96 authored Mar 16, 2024
1 parent 720920a commit 0cbec45
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/redo/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var (

const (
// DefaultTimeout is the default timeout for writing external storage.
DefaultTimeout = 15 * time.Minute
DefaultTimeout = 5 * time.Minute
// CloseTimeout is the default timeout for close redo writer.
CloseTimeout = 15 * time.Second

Expand Down Expand Up @@ -192,7 +192,8 @@ func IsBlackholeStorage(scheme string) bool {
var InitExternalStorage = func(ctx context.Context, uri url.URL) (storage.ExternalStorage, error) {
s, err := util.GetExternalStorageWithTimeout(ctx, uri.String(), DefaultTimeout)
if err != nil {
return nil, errors.WrapChangefeedUnretryableErr(errors.ErrStorageInitialize, err)
return nil, errors.WrapError(errors.ErrStorageInitialize, err,
fmt.Sprintf("can't init external storage for %s", uri.String()))
}
return s, nil
}
Expand Down

0 comments on commit 0cbec45

Please sign in to comment.