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

cdc: fix build table info #10492

Merged
merged 7 commits into from
Jan 19, 2024
Merged

Conversation

lidezhu
Copy link
Collaborator

@lidezhu lidezhu commented Jan 17, 2024

What problem does this PR solve?

Issue Number: ref #10386

What is changed and how it works?

Fix and improve BuildTiDBTableInfo;

  1. Add mock column id and mock index id for the generated TableInfo;
  2. Add checks to verify the legality of the arguments;
  3. Fix some small incorrect behaviour of the previous implementation including set charset and collation correctly;

Fix the wrong behavior that a primary column is always set an extra unique key flag in WrapTableInfo;

Add some helper method on TableInfo to query related information for columns;

Check List

Tests

  • Unit test

Questions

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

Release note

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 17, 2024
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jan 18, 2024
@lidezhu lidezhu force-pushed the fix-build-table-info branch 2 times, most recently from 93d17af to 1a790ea Compare January 18, 2024 03:40
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 18, 2024
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Merging #10492 (bce6a6f) into master (d5a2a00) will increase coverage by 0.0626%.
Report is 7 commits behind head on master.
The diff coverage is 53.3898%.

Additional details and impacted files
Components Coverage Δ
cdc 61.7851% <53.3898%> (+0.1343%) ⬆️
dm 51.2154% <ø> (-0.0203%) ⬇️
engine 63.3999% <ø> (+0.0141%) ⬆️
Flag Coverage Δ
unit 57.4750% <53.3898%> (+0.0626%) ⬆️

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

@@               Coverage Diff                @@
##             master     #10492        +/-   ##
================================================
+ Coverage   57.4123%   57.4750%   +0.0626%     
================================================
  Files           849        849                
  Lines        125858     125973       +115     
================================================
+ Hits          72258      72403       +145     
+ Misses        48193      48159        -34     
- Partials       5407       5411         +4     

@lidezhu
Copy link
Collaborator Author

lidezhu commented Jan 18, 2024

/test cdc-integration-kafka-test

@lidezhu
Copy link
Collaborator Author

lidezhu commented Jan 18, 2024

/retest

cdc/model/sink.go Outdated Show resolved Hide resolved
Co-authored-by: dongmen <20351731+asddongmen@users.noreply.github.com>
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jan 19, 2024
cdc/model/sink.go Outdated Show resolved Hide resolved
Co-authored-by: dongmen <20351731+asddongmen@users.noreply.github.com>
@ti-chi-bot ti-chi-bot bot added the lgtm label Jan 19, 2024
Copy link
Contributor

ti-chi-bot bot commented Jan 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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

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

@ti-chi-bot ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 19, 2024
Copy link
Contributor

ti-chi-bot bot commented Jan 19, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-01-19 05:44:07.5046185 +0000 UTC m=+507489.068916205: ☑️ agreed by asddongmen.
  • 2024-01-19 06:43:03.032097149 +0000 UTC m=+511024.596394839: ☑️ agreed by CharlesCheung96.

@lidezhu
Copy link
Collaborator Author

lidezhu commented Jan 19, 2024

/retest

@ti-chi-bot ti-chi-bot bot merged commit 33436f9 into pingcap:master Jan 19, 2024
27 checks passed
@lidezhu lidezhu deleted the fix-build-table-info branch January 19, 2024 08:45
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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants