Skip to content

Commit 46098cd

Browse files
author
Tianli Feng
committed
Allow _cluster_manager as a value of node filter
Signed-off-by: Tianli Feng <ftianli@amazon.com>
1 parent e8e2e30 commit 46098cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/main/java/org/opensearch/cluster/node/DiscoveryNodes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ public DiscoveryNode resolveNode(String node) {
370370
* Works by tracking the current set of nodes and applying each node specification in sequence. The set starts out empty and each node
371371
* specification may either add or remove nodes. For instance:
372372
*
373-
* - _local, _master and _all respectively add to the subset the local node, the currently-elected master, and all the nodes
373+
* - _local, _cluster_manager (_master) and _all respectively add to the subset the local node, the currently-elected cluster_manager, and all the nodes
374374
* - node IDs, names, hostnames and IP addresses all add to the subset any nodes which match
375375
* - a wildcard-based pattern of the form "attr*:value*" adds to the subset all nodes with a matching attribute with a matching value
376376
* - role:true adds to the subset all nodes with a matching role
@@ -393,7 +393,7 @@ public String[] resolveNodes(String... nodes) {
393393
if (localNodeId != null) {
394394
resolvedNodesIds.add(localNodeId);
395395
}
396-
} else if (nodeId.equals("_master")) {
396+
} else if (nodeId.equals("_master") || nodeId.equals("_cluster_manager")) {
397397
String masterNodeId = getMasterNodeId();
398398
if (masterNodeId != null) {
399399
resolvedNodesIds.add(masterNodeId);

0 commit comments

Comments
 (0)