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 19 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels 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.1530%. Comparing base (cc6fa6e) to head (6ec4675).
Report is 4 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
Components Coverage Δ
cdc 59.5582% <ø> (-0.0188%) ⬇️
dm 50.0644% <57.1428%> (+0.0038%) ⬆️
engine 53.2336% <ø> (ø)
Flag Coverage Δ
unit 55.1530% <57.1428%> (-0.0070%) ⬇️

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

@@               Coverage Diff                @@
##             master     #11749        +/-   ##
================================================
- Coverage   55.1599%   55.1530%   -0.0070%     
================================================
  Files          1003       1003                
  Lines        137462     137492        +30     
================================================
+ Hits          75824      75831         +7     
- Misses        56091      56106        +15     
- Partials       5547       5555         +8     

@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 247
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

dm/tests/openapi/run.sh Outdated Show resolved Hide resolved
dm/tests/openapi/run.sh Outdated Show resolved Hide resolved
@D3Hunter
Copy link
Contributor

cc @lance6716

@purelind
Copy link
Collaborator

purelind commented Dec 4, 2024

/test dm-compatibility-test

@OliverS929 OliverS929 force-pushed the 2411_dm_modes_rebase branch from c28573a to 1f1cfe8 Compare December 5, 2024 00:06
@OliverS929
Copy link
Author

/retest

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Dec 5, 2024
@OliverS929 OliverS929 requested a review from River2000i December 5, 2024 02:15
Copy link
Contributor

@River2000i River2000i left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

ti-chi-bot bot commented Dec 5, 2024

@River2000i: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

lgtm

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.

Comment on lines 221 to 223
run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"query-status $task_name_dump" \
"\"stage\": \"Running\"" 1
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe cannot get the Running stage, since sometime it will finish immediately. I think we can remove check Running

Copy link
Contributor

Choose a reason for hiding this comment

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

Also i have add a function to check stage by openapi. In this case using openapi check stage will be better

Copy link
Author

Choose a reason for hiding this comment

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

Sure. I remove the running stage check for dump. I also add back the check_dump_task_finished_status_success, which I think is the function you mentioned to check stage.

@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 5, 2024
@OliverS929
Copy link
Author

/retest

@OliverS929
Copy link
Author

/retest

1 similar comment
@OliverS929
Copy link
Author

/retest

dm/tests/openapi/run.sh Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 6, 2024
@ti-chi-bot ti-chi-bot bot added the lgtm label Dec 6, 2024
Copy link
Contributor

ti-chi-bot bot commented Dec 6, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: D3Hunter, lance6716, River2000i
Once this PR has been reviewed and has the lgtm label, please assign benmeadowcroft for approval. 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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Dec 6, 2024
Copy link
Contributor

ti-chi-bot bot commented Dec 6, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-05 02:14:10.568441268 +0000 UTC m=+1293838.188095785: ☑️ agreed by D3Hunter.
  • 2024-12-06 01:21:01.181144676 +0000 UTC m=+1377048.800799191: ☑️ agreed by lance6716.

@OliverS929
Copy link
Author

/cc @alastori @benmeadowcroft PTAL

Copy link
Contributor

ti-chi-bot bot commented Dec 11, 2024

@OliverS929: GitHub didn't allow me to request PR reviews from the following users: alastori, BenMeadowcroft, PTAL.

Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @alastori @benmeadowcroft PTAL

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.

@alastori
Copy link

lgtm

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. lgtm 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
6 participants