Bug #93125 New promoted Primary Server does not get sync and it is SUPER-READ-ONLY when it
Submitted: 8 Nov 2018 13:07 Modified: 25 Jan 2019 19:53
Reporter: Ivan Ma Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Group Replication Severity:S3 (Non-critical)
Version:8.0.13 OS:Oracle Linux (Linux virtual-41.localhost 4.1.12-124.15.2.el7uek.x86_64 #2 SMP Tue May 22 11:52:31 PDT 2018 x86_64 )
Assigned to: CPU Architecture:x86

[8 Nov 2018 13:07] Ivan Ma
Description:
Problem Statement
The application is not able to get immediate data from attaching to the Primary server via MySQL Router when Secondary Server takes over the Primary Server after the switch over process.
Inserting 10,000 rows in a single transaction to create a log SQL Apply duration and Kill the Primary Server.  
Then Reconnect to the MySQL Router for the New Primary Server from Failover process, printing the Rowcout on the table is 0.  Inserting same data showing SUPER-READ-ONLY value.

This is important for REAL Deployment when Database is failed and doing switch over.  Application will reconnect for data.   
Note :  by waiting for another moment, data is in fact getting to the New Primary.

How to repeat:
Please check attached word document.

Suggested fix:
When the Member Server is promoted to Primary and marked ONLINE.  It should be Data Applied (SQL Thread - finished applying data) and READ-ONLY/SUPER-READ-ONLY be turned off.
[15 Nov 2018 9:19] MySQL Verification Team
Hello Ivan Ma,

Thank you for the report and steps.

regards,
Umesh
[25 Jan 2019 19:53] Nuno Carvalho
Thanks for your feedback, implemented on WL#11123: "Group Replication: hold reads and writes when the new primary has replication backlog to apply" that is included on 8.0.14.