Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

operate-schema can set within task created process. #1899

Open
XuJianxu opened this issue Jul 21, 2021 · 4 comments
Open

operate-schema can set within task created process. #1899

XuJianxu opened this issue Jul 21, 2021 · 4 comments
Labels
type/feature-request This issue is a feature request

Comments

@XuJianxu
Copy link

Feature Request

Is your feature request related to a problem? Please describe:
#1895
operate-schema set can't use before dm task sync process.

Describe the feature you'd like:
operate-schema can set within task created process.

Describe alternatives you've considered:
It's easy to use. To avoid safe mode delete the DML.

Teachability, Documentation, Adoption, Migration Strategy:

@XuJianxu XuJianxu added the type/feature-request This issue is a feature request label Jul 21, 2021
@lance6716
Copy link
Collaborator

this action should be addressed in https://docs.pingcap.com/zh/tidb-data-migration/dev/shard-merge-best-practices#%E8%87%AA%E5%A2%9E%E4%B8%BB%E9%94%AE%E5%86%B2%E7%AA%81%E5%A4%84%E7%90%86 😂

currently for DELETE event DM will delete unexpected rows because of mismacthed table structure

@lance6716
Copy link
Collaborator

can we remove this limit? instead, we find the sync unit in subtask.units and call OperateSchema for it.

dm/dm/worker/subtask.go

Lines 539 to 542 in fadd543

syncUnit, ok := st.currUnit.(*syncer.Syncer)
if !ok {
return "", terror.ErrWorkerOperSyncUnitOnly.Generate(st.currUnit.Type())
}

@GMHDBJD

This will allow user to pause the task at load phase, to run operate-schema set.

@GMHDBJD
Copy link
Collaborator

GMHDBJD commented Jul 21, 2021

I still disagree let users manually pause the task and then set schema, no one will carefully read the document. 😭 Maybe an error and workaround would be better.

@lance6716
Copy link
Collaborator

I still disagree let users manually pause the task and then set schema, no one will carefully read the document. 😭 Maybe an error and workaround would be better.

just want to make a chance to rescue, that's not the final solution

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature-request This issue is a feature request
Projects
None yet
Development

No branches or pull requests

3 participants