Skip to content

Conversation

@lidezhu
Copy link
Collaborator

@lidezhu lidezhu commented Jan 2, 2025

What problem does this PR solve?

Issue Number: close #11963

What is changed and how it works?

Construct a rename table query which contains database name and table name in the ddl event.

Check List

Tests

  • Integration test

Questions

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

Release note

Fixed the issue that rename table ddl cannot be synchronized in some cases.

@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. labels Jan 2, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 2, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from lidezhu, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

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 added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/needs-triage-completed and removed do-not-merge/needs-linked-issue labels Jan 2, 2025
@codecov
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.8839%. Comparing base (91902aa) to head (7e5e90d).
Report is 46 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
Components Coverage Δ
cdc ∅ <ø> (∅)
dm 50.0815% <ø> (+1.1919%) ⬆️
engine 53.2449% <ø> (∅)
Flag Coverage Δ
unit 50.8839% <ø> (-2.7395%) ⬇️

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

@@               Coverage Diff                @@
##             master     #11964        +/-   ##
================================================
- Coverage   55.2634%   50.8839%   -4.3795%     
================================================
  Files          1004        484       -520     
  Lines        137733      69857     -67876     
================================================
- Hits          76116      35546     -40570     
+ Misses        56048      31549     -24499     
+ Partials       5569       2762      -2807     
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lidezhu
Copy link
Collaborator Author

lidezhu commented Jan 2, 2025

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 2, 2025
@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 2, 2025
@lidezhu
Copy link
Collaborator Author

lidezhu commented Jan 2, 2025

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 2, 2025
Comment on lines 1096 to 1100
// Note: preTableInfo may not be accurate for rename table.
// after pr: https://github.com/pingcap/tidb/pull/43341,
// assume there is a table `test.t` and a ddl: `rename table t to test2.t;`, and its commit ts is `100`.
// if you get a ddl snapshot at ts `99`, table `t` is already in `test2`.
// so preTableInfo.TableName.Schema will also be `test2`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it impact rename multiple tables?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No. Rename tables has it's unique way get these info.

@asddongmen
Copy link
Contributor

/test all

@asddongmen
Copy link
Contributor

/verify

@asddongmen
Copy link
Contributor

/test verify

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Apr 29, 2025

@asddongmen: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test pull-cdc-integration-kafka-test
/test pull-cdc-integration-mysql-test
/test pull-cdc-integration-pulsar-test
/test pull-cdc-integration-storage-test
/test pull-dm-compatibility-test
/test pull-dm-integration-test
/test pull-syncdiff-integration-test
/test pull-verify
/test wip-pull-build
/test wip-pull-check
/test wip-pull-unit-test-cdc
/test wip-pull-unit-test-dm
/test wip-pull-unit-test-engine

Use /test all to run the following jobs that were automatically triggered:

pingcap/tiflow/ghpr_verify
pingcap/tiflow/pull_cdc_integration_kafka_test
pingcap/tiflow/pull_cdc_integration_pulsar_test
pingcap/tiflow/pull_cdc_integration_storage_test
pingcap/tiflow/pull_cdc_integration_test
pingcap/tiflow/pull_dm_compatibility_test
pingcap/tiflow/pull_dm_integration_test
pingcap/tiflow/pull_syncdiff_integration_test

In response to this:

/test verify

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-sigs/prow repository.

Signed-off-by: dongmen <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 29, 2025
Signed-off-by: dongmen <[email protected]>
@lidezhu
Copy link
Collaborator Author

lidezhu commented Apr 29, 2025

/retest

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Apr 29, 2025

@lidezhu: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
jenkins-ticdc/verify c99eece link true /test verify
pull-verify 7e5e90d link true /test pull-verify
pull-cdc-integration-pulsar-test 7e5e90d link true /test pull-cdc-integration-pulsar-test
pull-cdc-integration-mysql-test 7e5e90d link true /test pull-cdc-integration-mysql-test
pull-cdc-integration-kafka-test 7e5e90d link true /test pull-cdc-integration-kafka-test
pull-cdc-integration-storage-test 7e5e90d link true /test pull-cdc-integration-storage-test

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fail to rename table to another db‘s table

4 participants