From 7058782b7f95813c1c38e6989a5eb835ba5d1628 Mon Sep 17 00:00:00 2001 From: Tianli Feng Date: Tue, 19 Jul 2022 16:01:19 -0700 Subject: [PATCH] Changed 2 references of JoinTaskExecutor.newBecomeMasterTask() to use JoinTaskExecutor.newBecomeClusterManagerTask() Signed-off-by: Tianli Feng --- .../java/org/opensearch/cluster/coordination/JoinHelper.java | 2 +- .../org/opensearch/indices/cluster/ClusterStateChanges.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java b/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java index f981b7b1ee8a8..2eae6411eff69 100644 --- a/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java +++ b/server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java @@ -540,7 +540,7 @@ public void close(Mode newMode) { final String stateUpdateSource = "elected-as-cluster-manager ([" + pendingAsTasks.size() + "] nodes joined)"; - pendingAsTasks.put(JoinTaskExecutor.newBecomeMasterTask(), (source, e) -> {}); + pendingAsTasks.put(JoinTaskExecutor.newBecomeClusterManagerTask(), (source, e) -> {}); pendingAsTasks.put(JoinTaskExecutor.newFinishElectionTask(), (source, e) -> {}); joinTaskExecutor = joinTaskExecutorGenerator.get(); masterService.submitStateUpdateTasks( diff --git a/server/src/test/java/org/opensearch/indices/cluster/ClusterStateChanges.java b/server/src/test/java/org/opensearch/indices/cluster/ClusterStateChanges.java index 671c9b90475a3..769fdc220bec4 100644 --- a/server/src/test/java/org/opensearch/indices/cluster/ClusterStateChanges.java +++ b/server/src/test/java/org/opensearch/indices/cluster/ClusterStateChanges.java @@ -399,7 +399,7 @@ public ClusterState addNodes(ClusterState clusterState, List node public ClusterState joinNodesAndBecomeClusterManager(ClusterState clusterState, List nodes) { List joinNodes = new ArrayList<>(); - joinNodes.add(JoinTaskExecutor.newBecomeMasterTask()); + joinNodes.add(JoinTaskExecutor.newBecomeClusterManagerTask()); joinNodes.add(JoinTaskExecutor.newFinishElectionTask()); joinNodes.addAll(nodes.stream().map(node -> new JoinTaskExecutor.Task(node, "dummy reason")).collect(Collectors.toList()));