Bug #115450 Issue with GTID replication MySQL Ver-8.0.36 | replication hangs
Submitted: 27 Jun 18:19 Modified: 5 Aug 11:03
Reporter: Mathava Selvan Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Replication Severity:S1 (Critical)
Version:MySQL Ver-8.0.36 OS:Linux
Assigned to: MySQL Verification Team CPU Architecture:Any

[27 Jun 18:19] Mathava Selvan
Description:
Issue with GTID replication MySQL Ver-8.0.36

- Upgraded MySQL version from 8.0.34 to 8.0.36

- After upgrading , an error message was thrown while starting the replication
  
   ERROR 1794 (HY000): bad configuration no log_slave_updates defined, slave would not replicate further to wsrep cluster

- Enabled log-slave-updates and started the replication { Note: It's read replica , so disabled bin-log already }

- Exec_Master_Log_Pos not getting change , replication delay keep increasing 

- In show processlist - innobase_commit_low (154428) state.

- Stop slave taking longer time , had to perform restart mysql-service forcefully

- After the upgrade , replication seemed to be running and was hanging

- Also , we could see some anonymous entries in Executed_Gtid_Set 

Executed_Gtid_Set: b4fe2a5c-3473-11ef-8294-eb57c21c6bb5:1-4064,
d7e04c6d-0092-11ef-9591-026aa7837c8f:1-726,
fe3f800d-5470-11e9-9ed8-06d143560e74:1-459131050:459131052-459131576:459131578-459132935:459132937-459133387:459133389-459133900:459133902-459134641:459134643-459136133:459136135-459136484:459136486-459136787:459136789-459136980:459136982-459137019:459137021-459140346

Please guide to resolve the issue.

How to repeat:

1. Configure the gtid replication with log_slave_updates

2. Check slave status and show process
[28 Jun 15:55] MySQL Verification Team
Hi,

Need help reproducing this.

You had  8.0.34 replicated to 8.0.34 and then you upgraded both to .36 and replication is working? When was the error about bad configuration thrown?
[29 Jun 9:06] Mathava Selvan
Yeah we had master -> slave with Ver-8.0.34 , after migrating Ver-8.0.36 got "ERROR 1794 (HY000): bad configuration no log_slave_updates defined, slave would not replicate" while starting the replication. 

Then enabled log-slave-updates. After which replication hanging and nonymous entries in Executed_Gtid_Set as mentioned already.
[29 Jun 16:44] MySQL Verification Team
You upgraded both slave and master in the same time or?
[1 Jul 4:25] Mathava Selvan
Yeah we have stopping pointing application to database , upgraded the both master and slave database on same time.
[2 Jul 14:57] huahua xu
After applying the patch, the other test cases:

mysql> explain format=tree SELECT /*+ NO_BNL(t0)*/ DISTINCT t0.c0 AS ref0 FROM t0 WHERE  EXISTS (SELECT 1);
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Table scan on <temporary>  (cost=5.58..5.58 rows=1)
    -> Temporary table with deduplication  (cost=3.07..3.07 rows=1)
        -> Inner hash join (no condition)  (cost=2.97 rows=1)
            -> Table scan on derived_1_2  (cost=2.61..2.61 rows=1)
                -> Materialize  (cost=0.1..0.1 rows=1)
                    -> Rows fetched before execution  (cost=0..0 rows=1)
            -> Hash
                -> Table scan on t0  (cost=0.35 rows=1)
 |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> explain format=tree SELECT /*+ NO_BNL(derived_1_2)*/ DISTINCT t0.c0 AS ref0 FROM t0 WHERE  EXISTS (SELECT 1);
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Table scan on <temporary>  (cost=5.58..5.58 rows=1)
    -> Temporary table with deduplication  (cost=3.06..3.06 rows=1)
        -> Nested loop inner join  (cost=2.96 rows=1)
            -> Table scan on t0  (cost=0.35 rows=1)
            -> Limit: 1 row(s)  (cost=2.61..2.61 rows=1)
                -> Table scan on derived_1_2  (cost=2.61..2.61 rows=1)
                    -> Materialize  (cost=0.1..0.1 rows=1)
                        -> Rows fetched before execution  (cost=0..0 rows=1)
 |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set, 1 warning (0.01 sec)

mysql> explain format=tree SELECT /*+ NO_BNL(t0, derived_1_2)*/ DISTINCT t0.c0 AS ref0 FROM t0 WHERE  EXISTS (SELECT 1);
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| EXPLAIN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -> Table scan on <temporary>  (cost=5.58..5.58 rows=1)
    -> Temporary table with deduplication  (cost=3.06..3.06 rows=1)
        -> Nested loop inner join  (cost=2.96 rows=1)
            -> Table scan on t0  (cost=0.35 rows=1)
            -> Limit: 1 row(s)  (cost=2.61..2.61 rows=1)
                -> Table scan on derived_1_2  (cost=2.61..2.61 rows=1)
                    -> Materialize  (cost=0.1..0.1 rows=1)
                        -> Rows fetched before execution  (cost=0..0 rows=1)
 |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set, 1 warning (0.00 sec)
[5 Jul 11:00] MySQL Verification Team
Hi huahua xu,

What patch? Are you sure you are posting to proper bug report?

Thanks
[5 Jul 11:03] MySQL Verification Team
Hi Mathava Selvan,

I have problem reproducing this. I setup replication with .36, let it run for a while, stop, upgrade servers to .38, let it run no issues.

>  anonymous entries in Executed_Gtid_Set

> replication seemed to be running and was hanging

I cannot reproduce this. After you resolved the replication problem and let replication continue, is replication going ok since then, or you encountered new problems?

Thanks
[6 Aug 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".