@Override
    public void isLeader() {
      // only leader publishes instance uri as endpoint which will be used by clients to make connections to HS2 via
      // service discovery.
      try {
        if (!hasLeadership()) {
          LOG.info("isLeader notification received but hasLeadership returned false.. awaiting..");
          leaderLatch.await();
        }
        addActiveEndpointToServiceRecord();
        LOG.info("HS2 instance in ACTIVE mode. Service record: {}", srv);
      } catch (Exception e) {
        throw new ServiceException("Unable to add active endpoint to service record", e);
      }
    }
Returns a new instance of leader latch path but retains the same uniqueId. This is only used when HS2 startsup or
when a manual failover is triggered (in which case uniqueId will still remain as the instance has not restarted)

@return - new leader latch
service/src/java/org/apache/hive/service/server/HS2ActivePassiveHARegistry.java