Skip to content

Commit bfa5613

Browse files
soosinhaakolarkunnu
authored andcommitted
Revert remote publication method renaming in DiscoveryNode (opensearch-project#16250)
Signed-off-by: Sooraj Sinha <[email protected]>
1 parent 3025040 commit bfa5613

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
@@ -513,10 +513,10 @@ private static void ensureRemoteClusterStateNodesCompatibility(DiscoveryNode joi
513513

514514
assert existingNodes.isEmpty() == false;
515515
Optional<DiscoveryNode> remotePublicationNode = existingNodes.stream()
516-
.filter(DiscoveryNode::isRemoteStatePublicationConfigured)
516+
.filter(DiscoveryNode::isRemoteStatePublicationEnabled)
517517
.findFirst();
518518

519-
if (remotePublicationNode.isPresent() && joiningNode.isRemoteStatePublicationConfigured()) {
519+
if (remotePublicationNode.isPresent() && joiningNode.isRemoteStatePublicationEnabled()) {
520520
ensureRepositoryCompatibility(joiningNode, remotePublicationNode.get(), REMOTE_CLUSTER_PUBLICATION_REPO_NAME_ATTRIBUTES);
521521
}
522522
}

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
@@ -518,7 +518,7 @@ public boolean isRemoteStoreNode() {
518518
* Returns whether settings required for remote cluster state publication is configured
519519
* @return true if the node contains remote cluster state node attribute and remote routing table node attribute
520520
*/
521-
public boolean isRemoteStatePublicationConfigured() {
521+
public boolean isRemoteStatePublicationEnabled() {
522522
return this.getAttributes()
523523
.keySet()
524524
.stream()

0 commit comments

Comments
 (0)