-
Notifications
You must be signed in to change notification settings - Fork 287
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
Add a stand-alone load mode to DM. (WIP) #11738
Conversation
not be needed anymore and could be depreciated in the future.
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
/test all |
/retest |
/retest |
@OliverS929: The following test failed, say
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/test-infra repository. I understand the commands that are listed here. |
/test engine-integration-test |
// adjust dir, no need to do for load&sync mode because it needs its own s3 repository | ||
// still use dir for standalone load mode (different from the behavior of load&sync mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// adjust dir, no need to do for load&sync mode because it needs its own s3 repository | |
// still use dir for standalone load mode (different from the behavior of load&sync mode) | |
// adjust dir for modes with load unit except load&sync mode because it needs its own s3 repository |
BTW because I don't know how does the new "load" mode is used, I'm not sure should DM adjust the dir or not. Maybe the new mode should be similar with "load&sync"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a comment in "engine/executor/dm/worker.go" mentioned that load&sync mode has its own external storage. From my understanding,load mode usage work with LoaderConfig.Dir, so calling storage.AdjustPath is necessary in this case. also /cc @D3Hunter . Would appreciate it if you could take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this further so that load and loadsync both skip the adjust part of the code and use "dir" directly.
@@ -935,7 +935,7 @@ var ( | |||
ErrConfigSyncerCfgConflict = New(codeConfigSyncerCfgConflict, ClassConfig, ScopeInternal, LevelMedium, "syncer-config-name and syncer should only specify one", "Please check the `syncer-config-name` and `syncer` config in task configuration file.") | |||
ErrConfigReadCfgFromFile = New(codeConfigReadCfgFromFile, ClassConfig, ScopeInternal, LevelMedium, "read config file %v", "") | |||
ErrConfigNeedUniqueTaskName = New(codeConfigNeedUniqueTaskName, ClassConfig, ScopeInternal, LevelMedium, "must specify a unique task name", "Please check the `name` config in task configuration file.") | |||
ErrConfigInvalidTaskMode = New(codeConfigInvalidTaskMode, ClassConfig, ScopeInternal, LevelMedium, "please specify right task-mode, support `full`, `incremental`, `all`", "Please check the `task-mode` config in task configuration file.") | |||
ErrConfigInvalidTaskMode = New(codeConfigInvalidTaskMode, ClassConfig, ScopeInternal, LevelMedium, "please specify right task-mode, support `full`, `incremental`, `all`, `dump`, `load`", "Please check the `task-mode` config in task configuration file.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we don't want to expose the two modes in dmctl
use case, we shouldn't change this message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Will change it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a second thought, terror is shared between openapi and dmctl. I think we might want to change this first to make sure our behavior with openapi is correct. Support of these two modes on dmctl could come a bit later. What do you think?
@@ -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, dmconfig.ModeLoadSync: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
case dmconfig.ModeDump, dmconfig.ModeLoad, dmconfig.ModeLoadSync: | |
case dmconfig.ModeDump, dmconfig.ModeLoad: |
sync unit will never finish
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for pointing this out. Will change this back.
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.
Check List
Tests
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.
Release note