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 12 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 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 55.1589%. Comparing base (68c22f3) to head (f409ba2).
Report is 2 commits behind head on master.

Additional details and impacted files
Components Coverage Δ
cdc 59.5859% <ø> (∅)
dm 50.0500% <57.1428%> (∅)
engine 53.2223% <ø> (ø)
Flag Coverage Δ
unit 55.1589% <57.1428%> (+1.9366%) ⬆️

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

@@               Coverage Diff                @@
##             master     #11749        +/-   ##
================================================
+ Coverage   53.2223%   55.1589%   +1.9366%     
================================================
  Files           213       1002       +789     
  Lines         17720     137401    +119681     
================================================
+ Hits           9431      75789     +66358     
- Misses         7686      56066     +48380     
- Partials        603       5546      +4943     

@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
engine/jobmaster/dm/task_manager.go Outdated Show resolved Hide resolved
engine/jobmaster/dm/worker_manager.go Outdated Show resolved Hide resolved
@OliverS929
Copy link
Author

/test dm-integration-test

Comment on lines +292 to +293
clean_cluster_sources_and_tasks
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>TEST OPENAPI: dump & load TASK"
Copy link
Contributor

Choose a reason for hiding this comment

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

please check data is correct on downstream

Comment on lines +255 to +260
openapi_task_check "create_dump_task_success"
run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"query-status $task_name_dump" \
"\"stage\": \"Stopped\"" 1

init_dump_data
Copy link
Contributor

Choose a reason for hiding this comment

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

in #11729, function test_dump_task() { also didn't check whether the data is correct, can you fix it in this pr too?

@D3Hunter
Copy link
Contributor

cc @lance6716

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