Description:
There are two parameters related to clone that control concurrency, --clone-autotune-concurrency and --clone-max-concurrency. The documentation for both parameters states that they are used in remote cloning, which would lead one to believe that they don't work in local cloning. But I actually tested and found that they work just as well in local cloning. So I think the documentation is misdescribed or at least ambiguous, it only states that it works under remote cloning.
How to repeat:
1. Ensure that the value of the parameters are equal to the default value.
mysql> show variables like 'clone%concurrency';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| clone_autotune_concurrency | ON |
| clone_max_concurrency | 16 |
+----------------------------+-------+
2. Perform a remote cloning and check the information in the clone_progress table to see that the number of threads is 1. (Because the dataset is so small, the clone is done before you have time to increase the number of threads)
mysql> clone instance from root@192.168.13.131:3306 identified by '123456' data directory='/tmp/mysql';
mysql> table clone_progress;
+------+-----------+-------------+----------------------------+----------------------------+---------+----------+----------+---------+------------+---------------+
| ID | STAGE | STATE | BEGIN_TIME | END_TIME | THREADS | ESTIMATE | DATA | NETWORK | DATA_SPEED | NETWORK_SPEED |
+------+-----------+-------------+----------------------------+----------------------------+---------+----------+----------+---------+------------+---------------+
| 1 | DROP DATA | Completed | 2024-06-12 10:12:58.089672 | 2024-06-12 10:12:58.099558 | 1 | 0 | 0 | 0 | 0 | 0 |
| 1 | FILE COPY | Completed | 2024-06-12 10:12:58.099660 | 2024-06-12 10:12:58.691643 | 1 | 72471141 | 72471141 | 3722138 | 0 | 0 |
| 1 | PAGE COPY | Completed | 2024-06-12 10:12:58.691773 | 2024-06-12 10:12:58.694802 | 1 | 0 | 0 | 63 | 0 | 0 |
| 1 | REDO COPY | Completed | 2024-06-12 10:12:58.694874 | 2024-06-12 10:12:58.696682 | 1 | 2560 | 2560 | 541 | 0 | 0 |
| 1 | FILE SYNC | Completed | 2024-06-12 10:12:58.696768 | 2024-06-12 10:12:58.726374 | 1 | 0 | 0 | 0 | 0 | 0 |
| 1 | RESTART | Not Started | NULL | NULL | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | RECOVERY | Not Started | NULL | NULL | 0 | 0 | 0 | 0 | 0 | 0 |
+------+-----------+-------------+----------------------------+----------------------------+---------+----------+----------+---------+------------+---------------+
3. Turn off --clone-max-concurrency and perform another remote clone, you can notice that this time the number of threads is 16. (If clone_autotune_concurrency is disabled, clone_max_concurrency defines the number of threads spawned for a remote cloning operation)
mysql> set global clone_autotune_concurrency=off;
mysql> clone instance from root@192.168.13.131:3306 identified by '123456' data directory='/tmp/mysql';
mysql> table clone_progress;
+------+-----------+-------------+----------------------------+----------------------------+---------+----------+----------+---------+------------+---------------+
| ID | STAGE | STATE | BEGIN_TIME | END_TIME | THREADS | ESTIMATE | DATA | NETWORK | DATA_SPEED | NETWORK_SPEED |
+------+-----------+-------------+----------------------------+----------------------------+---------+----------+----------+---------+------------+---------------+
| 1 | DROP DATA | Completed | 2024-06-12 10:29:20.251807 | 2024-06-12 10:29:20.260392 | 1 | 0 | 0 | 0 | 0 | 0 |
| 1 | FILE COPY | Completed | 2024-06-12 10:29:20.260499 | 2024-06-12 10:29:20.818454 | 16 | 72471141 | 72471141 | 3722786 | 0 | 0 |
| 1 | PAGE COPY | Completed | 2024-06-12 10:29:20.818725 | 2024-06-12 10:29:21.060190 | 16 | 0 | 0 | 392 | 0 | 0 |
| 1 | REDO COPY | Completed | 2024-06-12 10:29:21.060453 | 2024-06-12 10:29:21.294064 | 16 | 2560 | 2560 | 1003 | 0 | 0 |
| 1 | FILE SYNC | Completed | 2024-06-12 10:29:21.294327 | 2024-06-12 10:29:21.578679 | 16 | 0 | 0 | 0 | 0 | 0 |
| 1 | RESTART | Not Started | NULL | NULL | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | RECOVERY | Not Started | NULL | NULL | 0 | 0 | 0 | 0 | 0 | 0 |
+------+-----------+-------------+----------------------------+----------------------------+---------+----------+----------+---------+------------+---------------+
4. Repeating the above steps in the local cloning has the same effect as the remote cloning, indicating that both parameters work equally well for the local cloning.
Suggested fix:
Point out that both parameters work equally well for local cloning
or
Remove the words remote cloning from the description