code: private void updateGlobalIndex() {
      context.checkThread();
  
      // The global index may have increased even if the commit index didn't. Update the global index.
      // The global index is calculated by the minimum matchIndex for *all* servers in the cluster, including
      // passive members. This is critical since passive members still have state machines and thus it's still
      // important to ensure that tombstones are applied to their state machines.
      // If the members list is empty, use the local server's last log index as the global index.
      long currentTime = System.currentTimeMillis();
      long globalMatchIndex = context.getClusterState().getRemoteMemberStates().stream()
        .filter(m -> m.getMember().type() != Member.Type.RESERVE && (m.getMember().status() == Member.Status.AVAILABLE || currentTime - m.getMember().updated().toEpochMilli() < context.getGlobalSuspendTimeout().toMillis()))
        .mapToLong(MemberState::getMatchIndex)
        .min()
        .orElse(context.getLog().lastIndex());
      context.setGlobalIndex(globalMatchIndex);
    }
docs: Updates the global index.