Bug #105183 clone_status and clone_progress table return extra rows if queried concurrentl
Submitted: 11 Oct 2021 4:29
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Clone Plugin Severity:S3 (Non-critical)
Version:8.0.27 OS:Any
Assigned to: CPU Architecture:Any

[11 Oct 2021 4:29] Shane Bester
Description:
During a large remote clone,  if you query this:

select * from performance_schema.clone_progress;
select * from performance_schema.clone_status ;

from multiple connections,  the outputs have duplicate and/or NULL values occasionally..

e.g. this is bad output:

mysql> select * from performance_schema.clone_progress ;select * from performance_schema.clone_status ;
+------+-----------+-------------+----------------------------+----------------------------+---------+--------------+-------------+-------------+------------+---------------+
| ID   | STAGE     | STATE       | BEGIN_TIME                 | END_TIME                   | THREADS | ESTIMATE     | DATA        | NETWORK     | DATA_SPEED | NETWORK_SPEED |
+------+-----------+-------------+----------------------------+----------------------------+---------+--------------+-------------+-------------+------------+---------------+
|    1 | FILE COPY | In Progress | 2021-10-11 06:18:54.064422 | NULL                       |       0 |            0 |           0 |           0 |          0 |             0 |
|    1 | DROP DATA | Not Started | NULL                       | NULL                       |       0 |            0 |           0 |           0 |          0 |             0 |
|    1 | RESTART   | Not Started | NULL                       | NULL                       |       0 |            0 |           0 |           0 |          0 |             0 |
|    1 | DROP DATA | Completed   | 2021-10-11 06:18:53.941984 | 2021-10-11 06:18:54.064338 |       1 |            0 |           0 |           0 |          0 |             0 |
|    1 | FILE COPY | In Progress | 2021-10-11 06:18:54.064422 | NULL                       |       2 | 129465894491 | 37635802715 | 37637820865 |   60334730 |      60337952 |
|    1 | PAGE COPY | Not Started | NULL                       | NULL                       |       0 |            0 |           0 |           0 |          0 |             0 |
|    1 | REDO COPY | Not Started | NULL                       | NULL                       |       0 |            0 |           0 |           0 |          0 |             0 |
|    1 | FILE SYNC | Not Started | NULL                       | NULL                       |       0 |            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 |
+------+-----------+-------------+----------------------------+----------------------------+---------+--------------+-------------+-------------+------------+---------------+
10 rows in set (0.00 sec)

+------+------+-------------+-------------------------+----------+----------------+----------------+----------+---------------+-------------+-----------------+---------------+
| ID   | PID  | STATE       | BEGIN_TIME              | END_TIME | SOURCE         | DESTINATION    | ERROR_NO | ERROR_MESSAGE | BINLOG_FILE | BINLOG_POSITION | GTID_EXECUTED |
+------+------+-------------+-------------------------+----------+----------------+----------------+----------+---------------+-------------+-----------------+---------------+
| NULL | NULL | In Progress | NULL                    | NULL     | NULL           | NULL           |     NULL | NULL          | NULL        |            NULL | NULL          |
|    1 |    8 | In Progress | 2021-10-11 06:18:53.716 | NULL     | 127.0.0.1:3306 | LOCAL INSTANCE |        0 |               |             |               0 |               |
+------+------+-------------+-------------------------+----------+----------------+----------------+----------+---------------+-------------+-----------------+---------------+
2 rows in set (0.00 sec)

here is the output when queried only by a single connection:

mysql> select * from performance_schema.clone_progress ;select * from performance_schema.clone_status ;
+------+-----------+-------------+----------------------------+----------------------------+---------+--------------+-------------+-------------+------------+---------------+
| ID   | STAGE     | STATE       | BEGIN_TIME                 | END_TIME                   | THREADS | ESTIMATE     | DATA        | NETWORK     | DATA_SPEED | NETWORK_SPEED |
+------+-----------+-------------+----------------------------+----------------------------+---------+--------------+-------------+-------------+------------+---------------+
|    1 | DROP DATA | Completed   | 2021-10-11 06:18:53.941984 | 2021-10-11 06:18:54.064338 |       1 |            0 |           0 |           0 |          0 |             0 |
|    1 | FILE COPY | In Progress | 2021-10-11 06:18:54.064422 | NULL                       |       2 | 129465894491 | 44463081051 | 44465463817 |   37308883 |      37310824 |
|    1 | PAGE COPY | Not Started | NULL                       | NULL                       |       0 |            0 |           0 |           0 |          0 |             0 |
|    1 | REDO COPY | Not Started | NULL                       | NULL                       |       0 |            0 |           0 |           0 |          0 |             0 |
|    1 | FILE SYNC | Not Started | NULL                       | NULL                       |       0 |            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 |
+------+-----------+-------------+----------------------------+----------------------------+---------+--------------+-------------+-------------+------------+---------------+
7 rows in set (0.00 sec)

+------+------+-------------+-------------------------+----------+----------------+----------------+----------+---------------+-------------+-----------------+---------------+
| ID   | PID  | STATE       | BEGIN_TIME              | END_TIME | SOURCE         | DESTINATION    | ERROR_NO | ERROR_MESSAGE | BINLOG_FILE | BINLOG_POSITION | GTID_EXECUTED |
+------+------+-------------+-------------------------+----------+----------------+----------------+----------+---------------+-------------+-----------------+---------------+
|    1 |    8 | In Progress | 2021-10-11 06:18:53.716 | NULL     | 127.0.0.1:3306 | LOCAL INSTANCE |        0 |               |             |               0 |               |
+------+------+-------------+-------------------------+----------+----------------+----------------+----------+---------------+-------------+-----------------+---------------+
1 row in set (0.00 sec)

How to repeat:
create a large database (many gigabytes).
start a new clone e.g.
clone instance from 'root'@'127.0.0.1':3306 identified by '';

in a few threads execute this continuously:

select * from performance_schema.clone_progress;
select * from performance_schema.clone_status ;

and examine the outputs..   I'll attach some outputs.
[11 Oct 2021 4:31] MySQL Verification Team
some outputs showing duplicates/null values

Attachment: bug105183.output.txt (text/plain), 395.45 KiB.

[5 Apr 2022 6:04] Denis Bunker
Report of the bugs is prepared for the trucks. The methods of the bugs are done for the visitors. Approach of the https://topcvwritersuk.com/topcv-review/ - top cv reviews are implied for the shapes for the debugging and all issues for the feed.