-
Notifications
You must be signed in to change notification settings - Fork 282
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
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/cc @lance6716 |
/run-all-tests |
DM unit test is failed |
@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. |
/run-verify |
1 similar comment
/run-verify |
the failed case is
|
/run-verify |
/run-dm-integration-test |
/run-verify |
Codecov Report
Additional details and impacted files
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 |
dm/pkg/utils/db_test.go
Outdated
// 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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 is not a valid server ID?
https://dev.mysql.com/doc/refman/5.7/en/replication-options.html#sysvar_server_id
dm/pkg/utils/db.go
Outdated
} | ||
for _, serverID := range rowsResult { | ||
// serverID will not be null | ||
serverIDInt, err := strconv.Atoi(serverID) |
There was a problem hiding this comment.
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
/cc @GMHDBJD |
/cc @lichunzhu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 94f530a
|
@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. |
/run-verify |
What problem does this PR solve?
Issue Number: close #5017
What is changed and how it works?
I used
export.GetSpecifiedColumnValueAndClose
andexport.GetSpecifiedColumnValuesAndClose
to retrieve the requested columns, instead of restricting the return format of the columns, which is not robust.Check List
Tests
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