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

redo (ticdc): only delete changefeed related file when changefeed was removed #7279

Merged
merged 8 commits into from
Oct 10, 2022

Conversation

asddongmen
Copy link
Contributor

@asddongmen asddongmen commented Sep 30, 2022

What problem does this PR solve?

Issue Number: close #6413

What is changed and how it works?

Only delete the file belong to a changefeed when it's release, rather than the whole directory that used by it.

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)
  1. create changefeed test-1, and other two changefeed. Enable redo log for all of them, using the same storage uri:
s3://guagua/test1?access-key=xxxx&secret-access-key=xxxx&endpoint=http://xxxx/
  1. Replicate some data, and remove one changefeed.
  2. Inspect the s3://guagua/test1 dir, the files of removed changefeed has been deleted but other two changefeeds' files remain.
    image

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

Fix a bug that may cause changefeed's redo log files be deleted wrongly.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 30, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • nongfushanquan
  • zhaoxinyu

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.3 Should cherry pick this PR to release-6.3 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Sep 30, 2022
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 30, 2022
@asddongmen
Copy link
Contributor Author

/run-integration-tests

@amyangfei amyangfei added the area/ticdc Issues or PRs related to TiCDC. label Sep 30, 2022
@asddongmen asddongmen changed the title reod: only delete changefeed related file when changefeed was remove reod: only delete changefeed related file when changefeed was removed Oct 1, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 1, 2022

Codecov Report

Merging #7279 (aeac209) into master (8f81dbb) will increase coverage by 0.0024%.
The diff coverage is 59.3442%.

Additional details and impacted files
Flag Coverage Δ
cdc 67.2806% <62.6609%> (-0.0335%) ⬇️
dm 51.9866% <36.6666%> (+0.0325%) ⬆️
engine 61.0419% <57.1428%> (-0.0310%) ⬇️

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

@@               Coverage Diff                @@
##             master      #7279        +/-   ##
================================================
+ Coverage   59.7265%   59.7289%   +0.0023%     
================================================
  Files           790        789         -1     
  Lines         91204      91274        +70     
================================================
+ Hits          54473      54517        +44     
+ Misses        31987      31976        -11     
- Partials       4744       4781        +37     

Copy link
Contributor

@nongfushanquan nongfushanquan left a comment

Choose a reason for hiding this comment

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

please correct the title "Redo"

@asddongmen asddongmen changed the title reod: only delete changefeed related file when changefeed was removed redo (ticdc): only delete changefeed related file when changefeed was removed Oct 8, 2022
@zhaoxinyu
Copy link
Contributor

Rest LGTM

pkg/uuid/uuid.go Outdated
@@ -15,7 +15,7 @@ package uuid

import guuid "github.com/google/uuid"

// Generator defines an interface that can generate a uuid
// Generator defines an interface that can generate an uuid
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Generator defines an interface that can generate an uuid
// Generator defines an interface that can generate a uuid

Copy link
Contributor

Choose a reason for hiding this comment

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

The original code comment is correct.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 10, 2022
@ti-chi-bot ti-chi-bot removed the status/LGT1 Indicates that a PR has LGTM 1. label Oct 10, 2022
@ti-chi-bot ti-chi-bot added the status/LGT2 Indicates that a PR has LGTM 2. label Oct 10, 2022
@asddongmen
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 8c03288

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Oct 10, 2022
@ti-chi-bot
Copy link
Member

@asddongmen: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #7305.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #7306.

ti-chi-bot added a commit that referenced this pull request Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ticdc Issues or PRs related to TiCDC. component/redolog needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.3 Should cherry pick this PR to release-6.3 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

redo manager should only clean files of one specified changefeed instead of all changefeeds
7 participants