protected void handleIsolatedFromTopology()

in src/main/java/org/apache/sling/discovery/oak/OakDiscoveryService.java [191:208]


    protected void handleIsolatedFromTopology() {
        if (oakViewChecker != null) {
            // SLING-5030 part 2: when we detect being isolated we should
            // step at the end of the leader-election queue and
            // that can be achieved by resetting the leaderElectionId
            // (which will in turn take effect on the next round of
            // voting, or also double-checked when the local instance votes)
            //
            //TODO:
            // Note that when the local instance doesn't notice
            // an 'ISOLATED_FROM_TOPOLOGY' case, then the leaderElectionId
            // will not be reset. Which means that it then could potentially
            // regain leadership.
            if (oakViewChecker.resetLeaderElectionId()) {
                logger.info("getTopology: reset leaderElectionId to force this instance to the end of the instance order (thus incl not to remain leader)");
            }
        }
    }