Skip to content

Commit

Permalink
backup/pitr_coll: use target client of S3 (#59044)
Browse files Browse the repository at this point in the history
close #59043
  • Loading branch information
YuJuncen authored Jan 20, 2025
1 parent 62f9a39 commit 4e1cf8a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions br/pkg/storage/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 4e1cf8a

Please sign in to comment.