Skip to content

Commit

Permalink
Adding min version check
Browse files Browse the repository at this point in the history
  • Loading branch information
rajiv-kv committed Feb 8, 2024
1 parent 16d8152 commit b9f9f2a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.message.ParameterizedMessage;
import org.opensearch.Version;
import org.opensearch.action.ActionListenerResponseHandler;
import org.opensearch.action.ActionRunnable;
import org.opensearch.action.admin.cluster.state.term.ClusterTermVersionAction;
Expand Down Expand Up @@ -264,7 +265,7 @@ protected void doStart(ClusterState clusterState) {
} else {
DiscoveryNode clusterManagerNode = nodes.getClusterManagerNode();

if (checkTermVersion()) {
if (clusterManagerNode.getVersion().onOrAfter(Version.V_2_11_0) && checkTermVersion()) {
transportService.sendRequest(
clusterManagerNode,
ClusterTermVersionAction.NAME,
Expand Down

0 comments on commit b9f9f2a

Please sign in to comment.