-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: support concurrent apply dml binlog #1285
Conversation
I believe this is only safe to do if you verify that the unique key that you are using is memory-comparable. i.e. a |
… operations is restricted.、 Concurrency in applying binlog is supported when determining the unique index column of the chunk data. Only when all the column types in the unique index are int is concurrency allowed. If any column has a non-int type, the concurrency is set to 1.
…gh-ost into feat-concurrent-apply-dml-binlog
…ize suport from server
Yes, U R right, I have added a restriction that only allows concurrent operations when the unique index column of the chunk data is of type 'int'; otherwise, concurrency is not allowed. |
Am looking with interest to this PR as our migrations can only progress at night due to heavy write load during the day, even though our database has more than enough capacity to perform the DMLs from the binlogs concurrently instead of 1-by-1. Would be great if we can also progress during daytime with this. @shaohk Any progress or help needed? |
@dnovitski Are you sure that parallel replay of binlog events can meet your needs? From what you've described, there's heavy write activity during the day, so tasks can only run at night. Does that mean when the tasks run at night, serial replay of binlog events can't catch up with the binlog? So, you're considering parallel replay? |
During the night binlogs are caught up, and so table copy can continue mostly only at night for us. We've been testing with increasing |
Got it. |
Description
This PR is support concurrency apply dml binlog to _gho table.
script/cibuild
returns with no formatting errors, build errors or unit test errors.