Skip to content

ddl, disttask: import into integrate table mode - #61200

Merged
ti-chi-bot[bot] merged 111 commits into
pingcap:masterfrom
mileeeesW:tableModeImportInto
Aug 11, 2025
Merged

ti-chi-bot[bot] merged 111 commits into
pingcap:masterfrom
mileeeesW:tableModeImportInto

Conversation

@mileeeesW

@mileeeesW mileeeesW commented May 20, 2025 •

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #61199

Problem Summary:
import into need to integrate table mode for protect data read/write when import data.

What changed and how does it work?

  1. alter table mode to Import when submit import into task and reset table mode to Normal when finish import data.
  2. validate import into target table is empty when init executor.
  3. If post process fail, using clean up factory to reset table mode to Normal.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

Protect data consistency, DMLs are not allowed during the import into task running.

@ti-chi-bot ti-chi-bot Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. labels May 20, 2025
@ti-chi-bot

ti-chi-bot Bot commented May 20, 2025

Copy link
Copy Markdown

Hi @River2000i. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@ti-chi-bot ti-chi-bot Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. sig/planner SIG: Planner labels May 20, 2025
@tiprow

tiprow Bot commented May 20, 2025

Copy link
Copy Markdown

Hi @River2000i. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Details

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.

@lance6716

Copy link
Copy Markdown
Contributor

/ok-to-test

@ti-chi-bot ti-chi-bot Bot added ok-to-test Indicates a PR is ready to be tested. and removed needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels May 20, 2025
@codecov

codecov Bot commented May 20, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 26.66667% with 77 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.8988%. Comparing base (cdff328) to head (5fe7c72).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61200        +/-   ##
================================================
+ Coverage   72.8032%   74.8988%   +2.0955%     
================================================
  Files          1795       1842        +47     
  Lines        487746     497140      +9394     
================================================
+ Hits         355095     372352     +17257     
+ Misses       111018     101783      -9235     
- Partials      21633      23005      +1372     
Flag Coverage Δ
integration 49.0009% <16.1904%> (?)
unit 72.3585% <26.6666%> (+0.1752%) ⬆️

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

Components Coverage Δ
dumpling 52.8700% <ø> (ø)
parser ∅ <ø> (∅)
br 63.1722% <ø> (+16.8454%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mileeeesW mileeeesW changed the title [WIP]ddl, disttask: import into integrate table mode ddl, disttask: import into integrate table mode Jun 5, 2025

@joechenrh joechenrh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

New changes LGTM

Comment on lines +1353 to +1360
require.Eventually(s.T(), func() bool {
err := s.tk.QueryToErr("SELECT * FROM import_into.table_mode;")
if err != nil {
s.ErrorContains(err, "Table table_mode is in mode Import")
return false
}
return true
}, 5*time.Second, 100*time.Millisecond)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe we can extract it as a function like

func checkMode(tableName string, enterImportMode bool)

But it's fine to keep it

@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 6, 2025
@mileeeesW

Copy link
Copy Markdown
Contributor Author

/retest

@mileeeesW
mileeeesW requested a review from D3Hunter August 7, 2025 10:39
@ti-chi-bot ti-chi-bot Bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 8, 2025
@ti-chi-bot

ti-chi-bot Bot commented Aug 8, 2025

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: D3Hunter, hawkingrei, joechenrh

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

The pull request process is described here

Details 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 commented Aug 8, 2025

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2025-08-06 05:54:43.658261744 +0000 UTC m=+420393.801022919: ☑️ agreed by joechenrh.
  • 2025-08-08 09:30:52.51080714 +0000 UTC m=+651.545390368: ☑️ agreed by hawkingrei.

@ti-chi-bot ti-chi-bot Bot added the approved label Aug 8, 2025
@mileeeesW

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@mileeeesW

Copy link
Copy Markdown
Contributor Author

/retest

@ti-chi-bot

ti-chi-bot Bot commented Aug 11, 2025 •

Copy link
Copy Markdown

@River2000i: 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
non-block/pull-mysql-test-next-gen 3353edb link false /test pull-mysql-test-next-gen
non-block/pull-integration-e2e-test-next-gen 3353edb link false /test pull-integration-e2e-test-next-gen
non-block/pull-unit-test-next-gen 2fd7a88 link false /test pull-unit-test-next-gen

Full PR test history. Your PR dashboard.

Details

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.

@mileeeesW

Copy link
Copy Markdown
Contributor Author

/retest

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

Labels

approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/planner SIG: Planner size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tablemode: import into integrate table mode

5 participants