-
How can two onlineDDL tasks run concurrently? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The function And every ready onlineDDL task need to check conflicts with running tasks by the func What's more, if the To make a conclusion: Only when two onlineDDL tasks act on different tables, and one of them has set the |
Beta Was this translation helpful? Give feedback.
The function
onMigrationCheckTick
of onlineDDL scheduler will pick one ready task to run once time by callingrunNextMigration
.And every ready onlineDDL task need to check conflicts with running tasks by the func
isAnyConflictingMigrationRunning
: if the ready one has same table with the running one, or both of them has not set theallowConcurrent
option, then they can not run concurrently.What's more, if the
ReadyToComplete
flag of running task isfalse
, they can not run concurrently also.ReadyToComplete
flag is settrue
in the funcreviewRunningMigrations
of onlineDDL scheduler: when the funcisVReplMigrationReadyToCutOver
returns true, which means the onlineDDL task is ready to cut o…