Bug #91147 Force primary member to give up its role
Submitted: 5 Jun 2018 15:21 Modified: 25 Oct 2018 16:44
Reporter: Artem Danilov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Group Replication Severity:S4 (Feature request)
Version:8.0.11 OS:Any
Assigned to: CPU Architecture:Any

[5 Jun 2018 15:21] Artem Danilov
Description:
There should be a way to force current master to give up its primary role to other members ideally with the hint who should be a new primary. 

This operation needs to be available from any host in the group so that if operator/automation has problems to access the current primary the transition still can be initiated (in other words "STOP GROUP_REPLICATION" might not be always the option). 

The syntax should allow to avoid races and churns when multiple requests coming at the same time. E.g. operator/automation should be able to specify what is the current primary so that the operation will succeed if the specified primary is still current.

How to repeat:
This is a feature request. 

Suggested fix:
MOVE GROUP_REPLICATION PRIMARY FROM <current_host> TO <new_host>
[7 Jun 2018 6:16] MySQL Verification Team
Hello Artem,

Thank you for the feature request!

Thanks,
Umesh
[25 Oct 2018 16:43] Artem Danilov
Looks like this feature has been implemented: https://mysqlhighavailability.com/on-demand-primary-election
[25 Oct 2018 16:44] Artem Danilov
The feature is implemented in 8.0.13 by group_replication_set_as_primary function: https://dev.mysql.com/doc/refman/8.0/en/group-replication-functions-for-new-primary.html
[29 Oct 2018 13:50] David Moss
Posted by developer:
 
Hello Artem, thanks for your feedback. And yes indeed, this went into 8.0.13. Hope you find it useful!