<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="group-replication-responses-failure-partition">
      </a>
      20.7.7.2 Unreachable Majority Timeout
     </h4>
    </div>
   </div>
  </div>
  <p>
   By default, members that find themselves in a minority due to a
        network partition do not automatically leave the group. You can
        use the system variable
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_unreachable_majority_timeout">
    <code class="literal">
     group_replication_unreachable_majority_timeout
    </code>
   </a>
   to set a number of seconds for a member to wait after losing
        contact with the majority of group members, and then exit the
        group. Setting a timeout means you do not need to pro-actively
        monitor for servers that are in a minority group after a network
        partition, and you can avoid the possibility of creating a
        split-brain situation (with two versions of the group
        membership) due to inappropriate intervention.
  </p>
  <p>
   When the timeout specified by
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_unreachable_majority_timeout">
    <code class="literal">
     group_replication_unreachable_majority_timeout
    </code>
   </a>
   elapses, all pending transactions that have been processed by
        the member and the others in the minority group are rolled back,
        and the servers in that group move to the
   <code class="literal">
    ERROR
   </code>
   state. You can use the
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_autorejoin_tries">
    <code class="literal">
     group_replication_autorejoin_tries
    </code>
   </a>
   system variable to force the member to try to rejoin the group
        automatically at this point. This feature is active by default;
        the member makes three auto-rejoin attempts. If the auto-rejoin
        procedure does not succeed or is not attempted, the minority
        member then follows the exit action specified by
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_exit_state_action">
    <code class="literal">
     group_replication_exit_state_action
    </code>
   </a>
   .
  </p>
  <p>
   Consider the following points when deciding whether or not to
        set an unreachable majority timeout:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      In a symmetric group, for example a group with two or four
            servers, if both partitions contain an equal number of
            servers, both groups consider themselves to be in a minority
            and enter the
      <code class="literal">
       ERROR
      </code>
      state. In this
            situation, the group has no functional partition.
     </p>
    </li>
    <li class="listitem">
     <p>
      While a minority group exists, any transactions processed by
            the minority group are accepted, but blocked because the
            minority servers cannot reach quorum, until either
      <a class="link" href="stop-group-replication.html" title="15.4.3.2 STOP GROUP_REPLICATION Statement">
       <code class="literal">
        STOP GROUP_REPLICATION
       </code>
      </a>
      is
            issued on those servers or the unreachable majority timeout
            is reached.
     </p>
    </li>
    <li class="listitem">
     <p>
      If you do not set an unreachable majority timeout, the
            servers in the minority group never enter the
      <code class="literal">
       ERROR
      </code>
      state automatically, and you must
            stop them manually.
     </p>
    </li>
    <li class="listitem">
     <p>
      Setting an unreachable majority timeout has no effect if it
            is set on the servers in the minority group after the loss
            of majority has been detected.
     </p>
    </li>
   </ul>
  </div>
  <p>
   If you do not use the
   <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_unreachable_majority_timeout">
    <code class="literal">
     group_replication_unreachable_majority_timeout
    </code>
   </a>
   system
        variable, the process for operator invention in the event of a
        network partition is described in
   <a class="xref" href="group-replication-network-partitioning.html" title="20.7.8 Handling a Network Partition and Loss of Quorum">
    Section 20.7.8, “Handling a Network Partition and Loss of Quorum”
   </a>
   . The
        process involves checking which servers are functioning and
        forcing a new group membership if necessary.
  </p>
 </div>
 <br/>
</div>
