Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backup/pitr_coll: use target client of S3 #59044

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

YuJuncen
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #59043

Problem Summary:

We used the wrong client to copy object.

What changed and how does it work?

Used the rightly configured client to copy object.

Check List

Tests

  • Unit test

  • Integration test

  • Manual test (add detailed scripts or steps below)
    With the new client, now it returns no more BucketRegionError.

  • No need to test

    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@YuJuncen YuJuncen changed the title use target client of S3 backup/pitr_coll: use target client of S3 Jan 20, 2025
@ti-chi-bot ti-chi-bot bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed do-not-merge/invalid-title labels Jan 20, 2025
Copy link

tiprow bot commented Jan 20, 2025

Hi @YuJuncen. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was removed because I have checked the document and it reads:

If you call this API operation directly, make sure to design your application to parse the content of the response and handle it appropriately. If you use AWS SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply error handling per your configuration settings (including automatically retrying the request as appropriate). If the condition persists, the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an error).

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 20, 2025
Copy link

ti-chi-bot bot commented Jan 20, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BornChanger, RidRisR

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 20, 2025
Copy link

ti-chi-bot bot commented Jan 20, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-20 11:30:26.203834257 +0000 UTC m=+93953.534753671: ☑️ agreed by BornChanger.
  • 2025-01-20 11:33:14.089429645 +0000 UTC m=+94121.420349049: ☑️ agreed by RidRisR.

@YuJuncen
Copy link
Contributor Author

/hold before testing done

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 20, 2025
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 74.8666%. Comparing base (62f9a39) to head (8365608).
Report is 1 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59044        +/-   ##
================================================
+ Coverage   73.0189%   74.8666%   +1.8476%     
================================================
  Files          1683       1729        +46     
  Lines        465735     473872      +8137     
================================================
+ Hits         340075     354772     +14697     
+ Misses       104710      96686      -8024     
- Partials      20950      22414      +1464     
Flag Coverage Δ
integration 48.7068% <0.0000%> (?)
unit 72.2570% <0.0000%> (+0.0500%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 61.0740% <0.0000%> (+15.7700%) ⬆️

@YuJuncen
Copy link
Contributor Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 20, 2025
@ti-chi-bot ti-chi-bot bot merged commit 4e1cf8a into pingcap:master Jan 20, 2025
39 of 43 checks passed
YuJuncen added a commit to YuJuncen/tidb that referenced this pull request Jan 21, 2025
ti-chi-bot bot pushed a commit that referenced this pull request Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

log_backup: copy object uses wrong client making impossible to copy cross-region
3 participants