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

pkg(dm): improve the backward compatibility of “SHOW SLAVE HOSTS“ command #7372

Merged
merged 21 commits into from
Nov 11, 2022

Conversation

lyzx2001
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #5017

What is changed and how it works?

I used export.GetSpecifiedColumnValueAndClose and export.GetSpecifiedColumnValuesAndClose to retrieve the requested columns, instead of restricting the return format of the columns, which is not robust.

Check List

Tests

  • Unit test

Questions

Will it cause performance regression or break compatibility?

No.

Do you need to update user documentation, design documentation or monitoring documentation?

No.

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Oct 14, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lance6716
  • lichunzhu

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 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. labels Oct 14, 2022
@ti-chi-bot ti-chi-bot assigned lance6716 and unassigned lance6716 Oct 14, 2022
@lyzx2001
Copy link
Contributor Author

/cc @lance6716

@lyzx2001
Copy link
Contributor Author

/run-all-tests

@lance6716
Copy link
Contributor

DM unit test is failed

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 19, 2022
@ti-chi-bot
Copy link
Member

@lyzx2001: PR needs rebase.

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/test-infra repository.

@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 26, 2022
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 26, 2022
@lyzx2001
Copy link
Contributor Author

/run-verify

1 similar comment
@lyzx2001
Copy link
Contributor Author

/run-verify

@lance6716
Copy link
Contributor

lance6716 commented Oct 27, 2022

the failed case is

[2022-10-26T13:29:09.902Z]     server_test.go:2888: 
[2022-10-26T13:29:09.902Z]         	Error Trace:	/tmp/TestMaster1418414956/001/server_test.go:2888
[2022-10-26T13:29:09.902Z]         	Error:      	Should be true
[2022-10-26T13:29:09.902Z]         	Test:       	TestMaster

https://github.com/lyzx2001/tiflow/blob/904eaf05927564427df3952c640e59d80fc5c043/dm/master/server_test.go#L2888

@lyzx2001
Copy link
Contributor Author

/run-verify

@lyzx2001
Copy link
Contributor Author

/run-dm-integration-test

@lyzx2001
Copy link
Contributor Author

/run-verify

dm/pkg/conn/utils.go Outdated Show resolved Hide resolved
dm/pkg/conn/utils.go Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2022

Codecov Report

Merging #7372 (1c100ab) into master (f4754e1) will increase coverage by 0.0434%.
The diff coverage is 35.7894%.

Additional details and impacted files
Flag Coverage Δ
cdc 67.5508% <ø> (+0.1033%) ⬆️
dm 51.9823% <51.6666%> (-0.0259%) ⬇️
engine 60.9714% <8.5714%> (+0.0028%) ⬆️

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

@@               Coverage Diff                @@
##             master      #7372        +/-   ##
================================================
+ Coverage   59.8150%   59.8584%   +0.0434%     
================================================
  Files           803        803                
  Lines         92129      92291       +162     
================================================
+ Hits          55107      55244       +137     
- Misses        32213      32239        +26     
+ Partials       4809       4808         -1     

@ti-chi-bot ti-chi-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 3, 2022
// For MariaDB, when invalid conversion of Server_id (converting int32 in the upper-half of uint32 values to uint32)
{
sqlmock.NewRows([]string{"Server_id", "Host", "Port", "Master_id"}).
AddRow(-1, "iconnect2", 3306, 192168011).
Copy link
Contributor

Choose a reason for hiding this comment

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

}
for _, serverID := range rowsResult {
// serverID will not be null
serverIDInt, err := strconv.Atoi(serverID)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use https://pkg.go.dev/strconv#ParseUint, don't use int because its range is undetermined

@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 4, 2022
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 7, 2022
@lyzx2001
Copy link
Contributor Author

lyzx2001 commented Nov 9, 2022

/cc @GMHDBJD

@lyzx2001
Copy link
Contributor Author

/cc @lichunzhu

Copy link
Contributor

@lichunzhu lichunzhu left a comment

Choose a reason for hiding this comment

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

LGTM

dm/pkg/conn/utils_test.go Show resolved Hide resolved
@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 Nov 10, 2022
@lichunzhu
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 94f530a

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

@lyzx2001: 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.

@lyzx2001
Copy link
Contributor Author

/run-verify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. 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.

improve the backward compatibility of “SHOW SLAVE HOSTS“ command
5 participants