docs: public HostAddress searchByStartName(Protocol secondaryProtocol, List<HostAddress> loopAddress) {
      if (!isSecondaryHostFail()) {
        int checkWriterAttempts = 3;
        HostAddress currentWriter = null;
  
        do {
          try {
            currentWriter = searchForMasterHostAddress(secondaryProtocol, loopAddress);
          } catch (SQLException qe) {
            if (proxy.hasToHandleFailover(qe) && setSecondaryHostFail()) {
              addToBlacklist(secondaryProtocol.getHostAddress());
              return null;
            }
          }
          checkWriterAttempts--;
        } while (currentWriter == null && checkWriterAttempts > 0);
  
        // Handling special case where no writer is found from secondaryProtocol
        if (currentWriter == null && getClusterHostAddress() != null) {
          AuroraProtocol possibleMasterProtocol = AuroraProtocol
              .getNewProtocol(getProxy(), globalInfo, getUrlParser());
          possibleMasterProtocol.setHostAddress(getClusterHostAddress());
          try {
            possibleMasterProtocol.connect();
            if (possibleMasterProtocol.isMasterConnection()) {
              possibleMasterProtocol.setMustBeMasterConnection(true);
              foundActiveMaster(possibleMasterProtocol);
            } else {
              possibleMasterProtocol.setMustBeMasterConnection(false);
            }
          } catch (SQLException qe) {
            if (proxy.hasToHandleFailover(qe)) {
              addToBlacklist(possibleMasterProtocol.getHostAddress());
            }
          }
        }
  
        return currentWriter;
      }
      return null;
    }