From 41f7bd1432f44382dc6a7ee33b3315c660c80568 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Mon, 20 May 2024 21:01:15 +0800 Subject: [PATCH] redo(ticdc): return ErrStorageInitialize if the external storage initialization fails (#10745) (#10877) close pingcap/tiflow#10710 --- pkg/redo/config.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/redo/config.go b/pkg/redo/config.go index eb16f754ff0..3bcb2d78000 100644 --- a/pkg/redo/config.go +++ b/pkg/redo/config.go @@ -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 @@ -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 }