Thomas Vachuska
Committed by Gerrit Code Review

Eliminated the hang when shutting down a single-instance. Root cause remains in …

…the leadership topic withdrawal.

Change-Id: Iad740929b683a253a7eec0282b52e8f6f31ebcfe
......@@ -191,11 +191,14 @@ public class DistributedLeadershipManager implements LeadershipService {
@Deactivate
public void deactivate() {
if (clusterService.getNodes().size() > 1) {
// FIXME: Determine why this takes ~50 seconds to shutdown on a single node!
leaderBoard.forEach((topic, leadership) -> {
if (localNodeId.equals(leadership.leader())) {
withdraw(topic);
}
});
}
clusterService.removeListener(clusterEventListener);
eventDispatcher.removeSink(LeadershipEvent.class);
......