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

dm: add a stand-alone load mode #11749

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

OliverS929
Copy link

What problem does this PR solve?

Issue Number: close #9230

What is changed and how it works?

Primary work to add a stand-alone load mode to DM, alongside with dump mode. Load&Sync mode might not be needed anymore and could be depreciated in the future.

UT/IT added are under testing and will be pushed soon.

Continue the work from #11738 as its intended change in openapi conflicted with that of #11729.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Questions

Will it cause performance regression or break compatibility?

N/A

Do you need to update user documentation, design documentation or monitoring documentation?

Yes. Description of those standalone modes would need to be added to docs for openapi only. Support for dmctl will be delayed further.

Release note

Please refer to [Release Notes Language Style Guide](https://pingcap.github.io/tidb-dev-guide/contribute-to-tidb/release-notes-style-guide.html) to write a quality release note.

If you don't think this PR needs a release note then fill it with `None`.

@ti-chi-bot ti-chi-bot bot added first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. release-note Denotes a PR that will be considered when it comes time to generate release notes. area/dm Issues or PRs related to DM. area/engine Issues or PRs related to Dataflow Engine. labels Nov 14, 2024
Copy link
Contributor

ti-chi-bot bot commented Nov 14, 2024

[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 assign benmeadowcroft, d3hunter for approval, 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 the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 14, 2024
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 55.1517%. Comparing base (68c22f3) to head (7f75e36).

Additional details and impacted files
Components Coverage Δ
cdc 59.5770% <ø> (∅)
dm 50.0288% <57.1428%> (∅)
engine 53.2618% <0.0000%> (+0.0395%) ⬆️
Flag Coverage Δ
unit 55.1517% <50.0000%> (+1.9293%) ⬆️

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

@@               Coverage Diff                @@
##             master     #11749        +/-   ##
================================================
+ Coverage   53.2223%   55.1517%   +1.9293%     
================================================
  Files           213       1002       +789     
  Lines         17720     137401    +119681     
================================================
+ Hits           9431      75779     +66348     
- Misses         7686      56075     +48389     
- Partials        603       5547      +4944     

@OliverS929
Copy link
Author

/test engine-integration-test

@OliverS929
Copy link
Author

/test dm-integration-test

@OliverS929
Copy link
Author

/retest

Comment on lines +288 to +290
run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"query-status $task_name_load" 100 \
"\"stage\": \"Finished\"" 1
Copy link
Contributor

Choose a reason for hiding this comment

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

how about adding the sync task after load task finish? For test the complete create DM task

Copy link
Author

Choose a reason for hiding this comment

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

Yes, we can definitely do that. I actually have a test written in E2E, which I'll submit in a separate PR. How about I also add that test to the OpenAPI test suite along with the E2E PR? Additionally, we could merge the dump test with the existing load test, as the load test above already covers the dump task.

@D3Hunter D3Hunter changed the title Add a stand-alone load mode to DM. dm: add a stand-alone load mode Nov 15, 2024
@@ -287,7 +287,8 @@ func (tm *TaskManager) allFinished(ctx context.Context) bool {
if runningTask.Unit != frameModel.WorkerDMLoad {
return false
}
case dmconfig.ModeDump:
case dmconfig.ModeDump, dmconfig.ModeLoad:
Copy link
Contributor

Choose a reason for hiding this comment

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

no need to change engine code

@@ -302,6 +302,9 @@ var workerSeqMap = map[string][]frameModel.WorkerType{
dmconfig.ModeDump: {
frameModel.WorkerDMDump,
},
dmconfig.ModeLoad: {
Copy link
Contributor

Choose a reason for hiding this comment

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

doitto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dm Issues or PRs related to DM. area/engine Issues or PRs related to Dataflow Engine. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. 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.

engine: support new dm task mode
3 participants