boolean pauseIfThereIsNoCoordinator(int viewId, long retrySleep)
      throws InterruptedException {
    // if locators are restarting they may be handing out IDs from a stale view that
    // we should go through quickly. Otherwise we should sleep a bit to let failure
    // detection select a new coordinator
    if (viewId < 0) {
      // the process hasn't finished joining the cluster.
      logger.debug("sleeping for {} before making another attempt to find the coordinator",
          retrySleep);
      Thread.sleep(retrySleep);
    } else {
      // the member has joined the cluster.
      return true;
    }

    return false;
  }
attempt to join the distributed system loop send a join request to a locator & get a response
<p>
If the response indicates there's no coordinator it will contain a set of members that have
recently contacted it. The "oldest" member is selected as the coordinator based on ID sort
order.
geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java