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

mysql(ticdc): remove returned error and modify the log in CheckIsTiDB #11506

Merged

Conversation

wlwilliamx
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #11505

What is changed and how it works?

Description:
This PR refactors the CheckIsTiDB function in response to internal discussions. Previously, the function returned an error which was not necessary, as the external callers should not care about the error of the CheckIsTiDB function due to #11213.

Changes:

  1. Removed the error return type from CheckIsTiDB.
  2. Replaced the error log with a warning to handle cases where querying the TiDB version fails.
  3. Updated comments to explain the background and rationale for the change.

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 ti-chi-bot bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 21, 2024
@wlwilliamx wlwilliamx changed the title refactor(CheckIsTiDB): remove returned error and modify the log output from error to warning mysql(ticdc): remove returned error and modify the log output from error to warning Aug 21, 2024
@wlwilliamx wlwilliamx changed the title mysql(ticdc): remove returned error and modify the log output from error to warning mysql(ticdc): remove returned error and modify the log in CheckIsTiDB Aug 21, 2024
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 11.53846% with 23 lines in your changes missing coverage. Please review.

Project coverage is 57.7083%. Comparing base (691380d) to head (1fea471).
Report is 17 commits behind head on master.

Additional details and impacted files
Components Coverage Δ
cdc 61.6234% <11.5384%> (+0.4332%) ⬆️
dm 51.0853% <ø> (+0.0559%) ⬆️
engine 63.4161% <ø> (+0.0282%) ⬆️
Flag Coverage Δ
unit 57.7083% <11.5384%> (+0.2572%) ⬆️

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

@@               Coverage Diff                @@
##             master     #11506        +/-   ##
================================================
+ Coverage   57.4511%   57.7083%   +0.2572%     
================================================
  Files           851        851                
  Lines        126431     127063       +632     
================================================
+ Hits          72636      73326       +690     
+ Misses        48384      48331        -53     
+ Partials       5411       5406         -5     

Copy link
Collaborator

@hongyunyan hongyunyan left a comment

Choose a reason for hiding this comment

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

LGTM

@wlwilliamx
Copy link
Contributor Author

/retest

Copy link
Contributor

ti-chi-bot bot commented Sep 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: asddongmen, hongyunyan

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 [asddongmen,hongyunyan]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

ti-chi-bot bot commented Sep 9, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-21 12:49:43.857103107 +0000 UTC m=+356178.991553221: ☑️ agreed by hongyunyan.
  • 2024-09-09 10:17:57.892637626 +0000 UTC m=+265147.633061566: ☑️ agreed by asddongmen.

@wlwilliamx
Copy link
Contributor Author

/check-issue-triage-complete

@wlwilliamx
Copy link
Contributor Author

/pull-cdc-integration-kafka-test

@wlwilliamx
Copy link
Contributor Author

/test dm-integration-test

@wlwilliamx
Copy link
Contributor Author

/test cdc-integration-kafka-test

1 similar comment
@wlwilliamx
Copy link
Contributor Author

/test cdc-integration-kafka-test

@ti-chi-bot ti-chi-bot bot merged commit 0848c61 into pingcap:master Sep 10, 2024
27 of 28 checks passed
@wlwilliamx wlwilliamx deleted the refactor/check_tidb_error_handling branch September 11, 2024 06:15
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ticdc: Refactor CheckIsTiDB function to remove the returned error
3 participants