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

master, config(dm): fix case-sensitive compatibility for dmctl #5307

Merged
merged 4 commits into from
Apr 28, 2022

Conversation

lance6716
Copy link
Contributor

Signed-off-by: lance6716 lance6716@gmail.com

What problem does this PR solve?

Issue Number: close #5255

What is changed and how it works?

OpenAPI needs automatically decides the case-sensitive from MySQL, but dmctl should keep the compatibility. So I split the two functions.

Check List

Tests

  • Integration test

Code changes

Side effects

  • Increased code complexity

Related changes

  • Need to cherry-pick to the release branch

Release note

Fix DM can't replicate uppercase tables when the task has case-sensitive: false

Signed-off-by: lance6716 <lance6716@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Apr 28, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • D3Hunter
  • Ehco1996

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-5.3 Should cherry pick this PR to release-5.3 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-release-6.0 Should cherry pick this PR to release-6.0 branch. labels Apr 28, 2022
@lance6716 lance6716 added the area/dm Issues or PRs related to DM. label Apr 28, 2022
@lance6716 lance6716 requested a review from Ehco1996 April 28, 2022 07:55
@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 28, 2022
Copy link
Contributor

@Ehco1996 Ehco1996 left a comment

Choose a reason for hiding this comment

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

LGTM

checkAndAdjustSourceConfigFunc = checkAndAdjustSourceConfig
// the difference of below functions is checkAndAdjustSourceConfigForDMCtlFunc will not AdjustCaseSensitive. It's a
// compatibility compromise.
// When we need to change the implementation of dmctl to OpenAPI, we should notice the user about this change.
Copy link
Contributor

Choose a reason for hiding this comment

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

this upgrade case is so complex, we may add breaking change in doc and release note

see here

/cc @sunzhaoyang @WizardXiao

@@ -308,7 +308,7 @@ func (c *SourceConfig) Adjust(ctx context.Context, db *sql.DB) (err error) {
log.L().Warn("using an absolute relay path, relay log can't work when starting multiple relay worker")
}

return c.AdjustCaseSensitive(ctx2, db)
return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

I remembered why this change was introduced, it's because when implementing openAPI , I was referring to the v2 version of the task config 😵

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 28, 2022
Signed-off-by: lance6716 <lance6716@gmail.com>
@lance6716
Copy link
Contributor Author

/run-dm-integration-test

@lance6716
Copy link
Contributor Author

/run-verify
/run-dm-integration-test

Signed-off-by: lance6716 <lance6716@gmail.com>
@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 28, 2022
@lance6716 lance6716 requested a review from D3Hunter April 28, 2022 11:20
@codecov-commenter
Copy link

codecov-commenter commented Apr 28, 2022

Codecov Report

Merging #5307 (0633576) into master (687e248) will increase coverage by 0.0005%.
The diff coverage is 53.9645%.

Flag Coverage Δ
cdc 60.8853% <53.9645%> (+0.2866%) ⬆️
dm 52.3677% <ø> (-0.1019%) ⬇️

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

@@               Coverage Diff                @@
##             master      #5307        +/-   ##
================================================
+ Coverage   56.1240%   56.1245%   +0.0005%     
================================================
  Files           522        526         +4     
  Lines         65325      68838      +3513     
================================================
+ Hits          36663      38635      +1972     
- Misses        25094      26468      +1374     
- Partials       3568       3735       +167     

@lance6716
Copy link
Contributor Author

/run-dm-integration-test

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 28, 2022
@lance6716
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: a3f945b

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 28, 2022
@ti-chi-bot ti-chi-bot merged commit 1e4814e into pingcap:master Apr 28, 2022
ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Apr 28, 2022
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Apr 28, 2022
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dm Issues or PRs related to DM. needs-cherry-pick-release-5.3 Should cherry pick this PR to release-5.3 branch. needs-cherry-pick-release-5.4 Should cherry pick this PR to release-5.4 branch. needs-cherry-pick-release-6.0 Should cherry pick this PR to release-6.0 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.

DM can't sync uppercase tables if forget to set case-sensitive: true in task config
5 participants