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 (pingcap#10745) (pingcap#10877)

close pingcap#10710
  • Loading branch information
ti-chi-bot authored May 20, 2024
1 parent 4066cba commit 41f7bd1
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 41f7bd1

Please sign in to comment.