Skip to content

OnlineDDL: How can two onlineDDL tasks run concurrently? #355

Answered by newborn22
newborn22 asked this question in Q&A
Discussion options

You must be logged in to vote

The function onMigrationCheckTick of onlineDDL scheduler will pick one ready task to run once time by calling runNextMigration.

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 the allowConcurrent option, then they can not run concurrently.

What's more, if the ReadyToComplete flag of running task is false, they can not run concurrently also. ReadyToComplete flag is set true in the func reviewRunningMigrations of onlineDDL scheduler: when the func isVReplMigrationReadyToCutOver returns true, which means the onlineDDL task is ready to cut o…

Replies: 1 comment

Comment options

newborn22
Nov 8, 2023
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by newborn22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant