github / gh-ost

GitHub's Online Schema-migration Tool for MySQL
MIT License
12.11k stars 1.23k forks source link

feat concurrent chunk data #1398

Open shaohk opened 3 months ago

shaohk commented 3 months ago

Description

This PR Supports concurrent copying of chunk blocks during each time slice of copying the existing data.

In case this PR introduced Go code changes:

shaohk commented 3 months ago

MySQL insert ... select ... does not permit concurrent.

https://dev.mysql.com/doc/refman/5.7/en/insert-select.html

shaohk commented 3 months ago

When the unique index used for copying blocks includes an auto-increment column, concurrency is blocked on the auto-inc lock. If the unique index used does not include an auto-increment column, concurrency can proceed.