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

disagg: Fix lifecycle set on AWS S3 and add more http hooks #8284

Merged
merged 6 commits into from
Nov 1, 2023

Conversation

JaySon-Huang
Copy link
Contributor

@JaySon-Huang JaySon-Huang commented Oct 31, 2023

What problem does this PR solve?

Issue Number: close #8282, close #8288

Problem Summary:
Introduced by #8247

  • The S3 bucket lifecycle is not detected and added successfully on AWS S3. Seems the AWS S3 return "RESOURCE_NOT_FOUND" when lifecycle is not created at all now.
  • The S3 LIST always return empty result

What is changed and how it works?

  • Apply 2 patches to aws-sdk-cpp:
    • Fix the issue of S3 LIST always return nothing after bumping the aws-sdk-cpp
    • Reduce verbose useless logging
  • Check the error type of RESOURCE_NOT_FOUND
  • Add more http hooks for remote store operations:
    • "/tiflash/remote/owner/info" - get the remote gc owner info
    • "/tiflash/remote/owner/resign" - resign if the node is the remote gc owner
    • "/tiflash/remote/gc" - execute remote gc if the node is the remote gc owner
    • "/tiflash/remote/upload" - (re)upload all local data to the remote store at the next remote checkpoint
curl "http://172.31.9.1:20292/tiflash/remote/owner/info"
{"status":"IsOwner","owner_id":"172.31.9.1:3930"}

curl "http://172.31.9.1:20292/tiflash/remote/owner/resign"
{"message":"Done"}
curl "http://172.31.9.1:20292/tiflash/remote/owner/resign"
{"message":"This node is not the remote gc owner, can't be resigned."}

curl "http://172.31.9.1:20292/tiflash/remote/gc"          
{"status":"IsOwner","owner_id":"172.31.9.1:3930","execute":"true"}
curl "http://172.31.9.1:20292/tiflash/remote/gc"          
{"status":"NoLeader","owner_id":"","execute":"false"}

curl "http://172.31.9.1:20292/tiflash/remote/upload"          
{"message":"flag_set=true"}

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    • The lifecycle rule is added after remote gc run
  • No code

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

None

@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 31, 2023
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Nov 1, 2023
Copy link
Member

@CalvinNeo CalvinNeo left a comment

Choose a reason for hiding this comment

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

lgtm

@ti-chi-bot ti-chi-bot bot added the lgtm label Nov 1, 2023
Copy link
Contributor

ti-chi-bot bot commented Nov 1, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CalvinNeo, Lloyd-Pottiger

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:
  • OWNERS [CalvinNeo,Lloyd-Pottiger]

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Nov 1, 2023
Copy link
Contributor

ti-chi-bot bot commented Nov 1, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-11-01 01:47:40.300539964 +0000 UTC m=+3004057.887650101: ☑️ agreed by Lloyd-Pottiger.
  • 2023-11-01 02:43:16.843314673 +0000 UTC m=+3007394.430424818: ☑️ agreed by CalvinNeo.

@JaySon-Huang
Copy link
Contributor Author

/hold

@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 Nov 1, 2023
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 1, 2023
@JaySon-Huang
Copy link
Contributor Author

/hold cancel

@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 Nov 1, 2023
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@JaySon-Huang JaySon-Huang removed the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Nov 1, 2023
@SeaRise
Copy link
Contributor

SeaRise commented Nov 1, 2023

/run-unit-test

@JaySon-Huang
Copy link
Contributor Author

/run-integration-test

@ti-chi-bot ti-chi-bot bot merged commit e597b78 into pingcap:master Nov 1, 2023
@JaySon-Huang JaySon-Huang deleted the fix_lifecycle_set branch November 1, 2023 08:54
JaySon-Huang added a commit to ti-chi-bot/tiflash that referenced this pull request Nov 1, 2023
@JaySon-Huang JaySon-Huang mentioned this pull request Nov 1, 2023
12 tasks
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
4 participants