WL#13855: GR: Member actions

Affects: Server-8.0   —   Status: Complete

EXECUTIVE SUMMARY
=================

This worklog shall provide a framework for DBAs/operators to allow
configure a group to always stay in read-only mode.
The DBA/operator shall be able to trigger actions when a member
role changes to primary.


BACKGROUND
==========

In certain cases the DBA/operator may want that all members are read
only. For example, when this group (B) is replica of another group.


               Group A
        |---|   |---|   |---|
    /-- | P |   | S |   | S |
    |   |---|   |---|   |---|
    |     |       |       |
    |     -----------------
    |
    |
    |                       Group B
    | inbound        |---|   |---|   |---|
    \--------------> | P |   | S |   | S |
      replication    |---|   |---|   |---|
                       |       |       |
                       -----------------


USER STORIES
============

- As MySQL DBA, I want all members in group B, which is a replica
  of group A and should never be written into until group A is down,
  to be read only so that group B protects itself against
  direct/stray writes, and therefore prevent split brain situations
  between group A and group B under normal operations.