From 7948268c09af8bc024a1d29ee2710bd22dec6462 Mon Sep 17 00:00:00 2001 From: David Turner Date: Mon, 6 Aug 2018 12:35:18 +0100 Subject: [PATCH] Can only deactivate an active PeerFinder --- server/src/main/java/org/elasticsearch/discovery/PeerFinder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/main/java/org/elasticsearch/discovery/PeerFinder.java b/server/src/main/java/org/elasticsearch/discovery/PeerFinder.java index 8c230dd93a6ad..10d4115352da7 100644 --- a/server/src/main/java/org/elasticsearch/discovery/PeerFinder.java +++ b/server/src/main/java/org/elasticsearch/discovery/PeerFinder.java @@ -102,6 +102,7 @@ public void activate(final DiscoveryNodes lastAcceptedNodes) { public void deactivate(DiscoveryNode leader) { synchronized (mutex) { + assert active; logger.trace("deactivating and setting leader to {}", leader); active = false; handleWakeUp();