diff --git a/server/src/main/java/org/opensearch/cluster/MasterNodeChangePredicate.java b/server/src/main/java/org/opensearch/cluster/MasterNodeChangePredicate.java index 0c247f31cafb8..8eeaedd83cb26 100644 --- a/server/src/main/java/org/opensearch/cluster/MasterNodeChangePredicate.java +++ b/server/src/main/java/org/opensearch/cluster/MasterNodeChangePredicate.java @@ -51,11 +51,11 @@ public static Predicate build(ClusterState currentState) { final DiscoveryNode clusterManagerNode = currentState.nodes().getMasterNode(); final String currentMasterId = clusterManagerNode == null ? null : clusterManagerNode.getEphemeralId(); return newState -> { - final DiscoveryNode newMaster = newState.nodes().getMasterNode(); + final DiscoveryNode newClusterManager = newState.nodes().getMasterNode(); final boolean accept; - if (newMaster == null) { + if (newClusterManager == null) { accept = false; - } else if (newMaster.getEphemeralId().equals(currentMasterId) == false) { + } else if (newClusterManager.getEphemeralId().equals(currentMasterId) == false) { accept = true; } else { accept = newState.version() > currentVersion; diff --git a/server/src/main/java/org/opensearch/index/shard/IndexShard.java b/server/src/main/java/org/opensearch/index/shard/IndexShard.java index bc57fdb061d45..7a12952316c67 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexShard.java @@ -549,7 +549,7 @@ public void updateShardState( * in one state causing it's term to be incremented. Note that if both current shard state and new * shard state are initializing, we could replace the current shard and reinitialize it. It is however * possible that this shard is being started. This can happen if: - * 1) Shard is post recovery and sends shard started to the mcluster-manager + * 1) Shard is post recovery and sends shard started to the cluster-manager * 2) Node gets disconnected and rejoins * 3) Cluster-manager assigns the shard back to the node * 4) Cluster-manager processes the shard started and starts the shard diff --git a/server/src/main/java/org/opensearch/indices/cluster/IndicesClusterStateService.java b/server/src/main/java/org/opensearch/indices/cluster/IndicesClusterStateService.java index 9e0125b2c6ab2..045aa75300e85 100644 --- a/server/src/main/java/org/opensearch/indices/cluster/IndicesClusterStateService.java +++ b/server/src/main/java/org/opensearch/indices/cluster/IndicesClusterStateService.java @@ -278,7 +278,7 @@ private void updateFailedShardsCache(final ClusterState state) { } else { // TODO: can we remove this? Is resending shard failures the responsibility of shardStateAction? if (clusterManagerNode != null) { - String message = "master " + clusterManagerNode + " has not removed previously failed shard. resending shard failure"; + String message = "cluster-manager " + clusterManagerNode + " has not removed previously failed shard. resending shard failure"; logger.trace("[{}] re-sending failed shard [{}], reason [{}]", matchedRouting.shardId(), matchedRouting, message); shardStateAction.localShardFailed(matchedRouting, message, null, SHARD_STATE_ACTION_LISTENER, state); } diff --git a/server/src/main/java/org/opensearch/node/Node.java b/server/src/main/java/org/opensearch/node/Node.java index aa91276c55b43..c1152afd6fe44 100644 --- a/server/src/main/java/org/opensearch/node/Node.java +++ b/server/src/main/java/org/opensearch/node/Node.java @@ -233,7 +233,7 @@ public class Node implements Closeable { Property.Deprecated, Property.NodeScope ); - private static final Setting NODE_CLUSTER_MANAGER_SETTING = Setting.boolSetting( + private static final Setting NODE_MASTER_SETTING = Setting.boolSetting( "node.master", true, Property.Deprecated, @@ -256,7 +256,7 @@ public class Node implements Closeable { * controls whether the node is allowed to persist things like metadata to disk * Note that this does not control whether the node stores actual indices (see * {@link #NODE_DATA_SETTING}). However, if this is false, {@link #NODE_DATA_SETTING} - * and {@link #NODE_CLUSTER_MANAGER_SETTING} must also be false. + * and {@link #NODE_MASTER_SETTING} must also be false. * */ public static final Setting NODE_LOCAL_STORAGE_SETTING = Setting.boolSetting( @@ -445,7 +445,7 @@ protected Node( // register the node.data, node.ingest, node.master, node.remote_cluster_client settings here so we can mark them private additionalSettings.add(NODE_DATA_SETTING); additionalSettings.add(NODE_INGEST_SETTING); - additionalSettings.add(NODE_CLUSTER_MANAGER_SETTING); + additionalSettings.add(NODE_MASTER_SETTING); additionalSettings.add(NODE_REMOTE_CLUSTER_CLIENT); additionalSettings.addAll(pluginsService.getPluginSettings()); final List additionalSettingsFilter = new ArrayList<>(pluginsService.getPluginSettingsFilter());