@@ -65,7 +65,6 @@ public class DiscoveryNodes implements Iterable<DiscoveryNode>, SimpleDiffable<D
6565 private final String localNodeId ;
6666 @ Nullable
6767 private final DiscoveryNode localNode ;
68- private final Version minNonClientNodeVersion ;
6968 private final Version maxNodeVersion ;
7069 private final Version minNodeVersion ;
7170 private final IndexVersion maxDataNodeCompatibleIndexVersion ;
@@ -81,7 +80,6 @@ private DiscoveryNodes(
8180 Map <String , DiscoveryNode > ingestNodes ,
8281 @ Nullable String masterNodeId ,
8382 @ Nullable String localNodeId ,
84- Version minNonClientNodeVersion ,
8583 Version maxNodeVersion ,
8684 Version minNodeVersion ,
8785 IndexVersion maxDataNodeCompatibleIndexVersion ,
@@ -98,7 +96,6 @@ private DiscoveryNodes(
9896 assert (masterNodeId == null ) == (masterNode == null );
9997 this .localNodeId = localNodeId ;
10098 this .localNode = localNodeId == null ? null : nodes .get (localNodeId );
101- this .minNonClientNodeVersion = minNonClientNodeVersion ;
10299 this .minNodeVersion = minNodeVersion ;
103100 this .maxNodeVersion = maxNodeVersion ;
104101 this .maxDataNodeCompatibleIndexVersion = maxDataNodeCompatibleIndexVersion ;
@@ -117,7 +114,6 @@ public DiscoveryNodes withMasterNodeId(@Nullable String masterNodeId) {
117114 ingestNodes ,
118115 masterNodeId ,
119116 localNodeId ,
120- minNonClientNodeVersion ,
121117 maxNodeVersion ,
122118 minNodeVersion ,
123119 maxDataNodeCompatibleIndexVersion ,
@@ -346,17 +342,6 @@ public boolean isMixedVersionCluster() {
346342 return minNodeVersion .equals (maxNodeVersion ) == false ;
347343 }
348344
349- /**
350- * Returns the version of the node with the oldest version in the cluster that is not a client node
351- *
352- * If there are no non-client nodes, Version.CURRENT will be returned.
353- *
354- * @return the oldest version in the cluster
355- */
356- public Version getSmallestNonClientNodeVersion () {
357- return minNonClientNodeVersion ;
358- }
359-
360345 /**
361346 * Returns the highest index version supported by all data nodes in the cluster
362347 */
@@ -853,14 +838,12 @@ public DiscoveryNodes build() {
853838 */
854839 Version minNodeVersion = null ;
855840 Version maxNodeVersion = null ;
856- Version minNonClientNodeVersion = null ;
857841 IndexVersion maxDataNodeCompatibleIndexVersion = null ;
858842 IndexVersion minSupportedIndexVersion = null ;
859843 for (Map .Entry <String , DiscoveryNode > nodeEntry : nodes .entrySet ()) {
860844 DiscoveryNode discoNode = nodeEntry .getValue ();
861845 Version version = discoNode .getVersion ();
862846 if (discoNode .canContainData () || discoNode .isMasterNode ()) {
863- minNonClientNodeVersion = min (minNonClientNodeVersion , version );
864847 maxDataNodeCompatibleIndexVersion = min (maxDataNodeCompatibleIndexVersion , discoNode .getMaxIndexVersion ());
865848 }
866849 minNodeVersion = min (minNodeVersion , version );
@@ -894,7 +877,6 @@ public DiscoveryNodes build() {
894877 filteredNodes (nodes , DiscoveryNode ::isIngestNode ),
895878 masterNodeId ,
896879 localNodeId ,
897- Objects .requireNonNullElse (minNonClientNodeVersion , Version .CURRENT ),
898880 Objects .requireNonNullElse (maxNodeVersion , Version .CURRENT ),
899881 Objects .requireNonNullElse (minNodeVersion , Version .CURRENT .minimumCompatibilityVersion ()),
900882 Objects .requireNonNullElse (maxDataNodeCompatibleIndexVersion , IndexVersion .current ()),
0 commit comments