Skip to content

Commit b260162

Browse files
committed
Revert remote publication method renaming in DiscoveryNode (opensearch-project#16250)
Signed-off-by: Sooraj Sinha <[email protected]>
1 parent 29a83d9 commit b260162

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

server/src/main/java/org/opensearch/cluster/coordination/CoordinationState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public CoordinationState(
108108
// ToDo: revisit this check while making the setting dynamic
109109
this.isRemotePublicationEnabled = isRemoteStateEnabled
110110
&& REMOTE_PUBLICATION_SETTING.get(settings)
111-
&& localNode.isRemoteStatePublicationConfigured();
111+
&& localNode.isRemoteStatePublicationEnabled();
112112
}
113113

114114
public boolean isRemotePublicationEnabled() {

server/src/main/java/org/opensearch/cluster/coordination/JoinTaskExecutor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,10 +574,10 @@ private static void ensureRemoteClusterStateNodesCompatibility(DiscoveryNode joi
574574

575575
assert existingNodes.isEmpty() == false;
576576
Optional<DiscoveryNode> remotePublicationNode = existingNodes.stream()
577-
.filter(DiscoveryNode::isRemoteStatePublicationConfigured)
577+
.filter(DiscoveryNode::isRemoteStatePublicationEnabled)
578578
.findFirst();
579579

580-
if (remotePublicationNode.isPresent() && joiningNode.isRemoteStatePublicationConfigured()) {
580+
if (remotePublicationNode.isPresent() && joiningNode.isRemoteStatePublicationEnabled()) {
581581
ensureRepositoryCompatibility(joiningNode, remotePublicationNode.get(), REMOTE_CLUSTER_PUBLICATION_REPO_NAME_ATTRIBUTES);
582582
}
583583
}

server/src/main/java/org/opensearch/cluster/coordination/PublicationTransportHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ private boolean validateRemotePublicationConfiguredOnAllNodes(DiscoveryNodes dis
370370
assert ClusterMetadataManifest.getCodecForVersion(discoveryNodes.getMinNodeVersion()) >= ClusterMetadataManifest.CODEC_V0;
371371
for (DiscoveryNode node : discoveryNodes.getNodes().values()) {
372372
// if a node is non-remote then created local publication context
373-
if (node.isRemoteStatePublicationConfigured() == false) {
373+
if (node.isRemoteStatePublicationEnabled() == false) {
374374
return false;
375375
}
376376
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ public boolean isRemoteStoreNode() {
563563
* Returns whether settings required for remote cluster state publication is configured
564564
* @return true if the node contains remote cluster state node attribute and remote routing table node attribute
565565
*/
566-
public boolean isRemoteStatePublicationConfigured() {
566+
public boolean isRemoteStatePublicationEnabled() {
567567
return this.getAttributes()
568568
.keySet()
569569
.stream()

0 commit comments

Comments
 (0)