Skip to content

Commit

Permalink
Merge pull request #21649 from vespa-engine/revert-21647-jonmv/shut-d…
Browse files Browse the repository at this point in the history
…own-clustercontroller-before-ZK

Revert "Ensure ClusterController shuts down before ZK cluster is uses"
  • Loading branch information
Harald Musum authored Mar 11, 2022
2 parents a4b5d9e + d2620d6 commit 759f0f2
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import com.yahoo.vespa.clustercontroller.core.restapiv2.ClusterControllerStateRestAPI;
import com.yahoo.vespa.clustercontroller.core.status.StatusHandler;
import com.yahoo.vespa.curator.Curator;
import com.yahoo.vespa.zookeeper.Reconfigurer;
import com.yahoo.vespa.zookeeper.VespaZooKeeperServer;

import java.util.LinkedHashMap;
Expand All @@ -32,19 +31,14 @@ public class ClusterController extends AbstractComponent
private final Map<String, FleetController> controllers = new TreeMap<>();
private final Map<String, StatusHandler.ContainerStatusPageServer> status = new TreeMap<>();

ClusterController() {
this(null);
}

/**
* Dependency injection constructor for controller. A {@link VespaZooKeeperServer} argument is required
* for all its users, to ensure that zookeeper has started before we start polling it, but
* should not be injected here, as that causes recreation of the cluster controller, and old and new
* will run master election, etc., concurrently, which breaks everything.
* Instead, a {@link Reconfigurer} is injected to ensure this is shutdown before the ZK server owned by that.
*/
@Inject
public ClusterController(Reconfigurer unused) {
public ClusterController() {
metricWrapper = new JDiscMetricWrapper(null);
}

Expand Down

0 comments on commit 759f0f2

Please sign in to comment.