From 4e1cf8a4066b2adf5b632ae3168bac99447b1d17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=B2=9A?= <36239017+YuJuncen@users.noreply.github.com> Date: Mon, 20 Jan 2025 20:13:53 +0800 Subject: [PATCH] backup/pitr_coll: use target client of S3 (#59044) close pingcap/tidb#59043 --- br/pkg/storage/s3.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/br/pkg/storage/s3.go b/br/pkg/storage/s3.go index 5c5c03c911063..eaba8f43cf7ca 100644 --- a/br/pkg/storage/s3.go +++ b/br/pkg/storage/s3.go @@ -110,9 +110,8 @@ func (rs *S3Storage) CopyFrom(ctx context.Context, e ExternalStorage, spec CopyS Key: aws.String(rs.options.Prefix + spec.To), } - // NOTE: Maybe check whether the Go SDK will handle 200 OK errors. - // https://repost.aws/knowledge-center/s3-resolve-200-internalerror - _, err := s.svc.CopyObjectWithContext(ctx, copyInput) + // We must use the client of the target region. + _, err := rs.svc.CopyObjectWithContext(ctx, copyInput) return err }