File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
server/src/main/java/org/opensearch Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 3737import org .opensearch .common .annotation .PublicApi ;
3838import org .opensearch .common .settings .Setting ;
3939import org .opensearch .common .settings .Settings ;
40+ import org .opensearch .common .util .FeatureFlags ;
4041import org .opensearch .core .common .io .stream .BufferedChecksumStreamOutput ;
4142import org .opensearch .core .common .io .stream .StreamInput ;
4243import org .opensearch .core .common .io .stream .StreamOutput ;
@@ -352,7 +353,7 @@ public DiscoveryNode(StreamInput in) throws IOException {
352353 this .hostName = in .readString ().intern ();
353354 this .hostAddress = in .readString ().intern ();
354355 this .address = new TransportAddress (in );
355- if (in .getVersion ().onOrAfter (Version .V_3_2_0 )) {
356+ if (in .getVersion ().onOrAfter (Version .V_3_2_0 ) && FeatureFlags . isTransportStreamFeatureEnabled () ) {
356357 this .streamAddress = in .readOptionalWriteable (TransportAddress ::new );
357358 } else {
358359 streamAddress = null ;
@@ -435,7 +436,7 @@ private void writeNodeDetails(StreamOutput out) throws IOException {
435436 out .writeString (hostName );
436437 out .writeString (hostAddress );
437438 address .writeTo (out );
438- if (out .getVersion ().onOrAfter (Version .V_3_2_0 )) {
439+ if (out .getVersion ().onOrAfter (Version .V_3_2_0 ) && FeatureFlags . isTransportStreamFeatureEnabled () ) {
439440 out .writeOptionalWriteable (streamAddress );
440441 }
441442 }
Original file line number Diff line number Diff line change @@ -117,6 +117,10 @@ public class FeatureFlags {
117117 public static final String STREAM_TRANSPORT = FEATURE_FLAG_PREFIX + "transport.stream.enabled" ;
118118 public static final Setting <Boolean > STREAM_TRANSPORT_SETTING = Setting .boolSetting (STREAM_TRANSPORT , false , Property .NodeScope );
119119
120+ public static boolean isTransportStreamFeatureEnabled (){
121+ return FeatureFlags .isEnabled (FeatureFlags .STREAM_TRANSPORT );
122+ }
123+
120124 public static final String ARROW_STREAMS = FEATURE_FLAG_PREFIX + "arrow.streams.enabled" ;
121125 public static final Setting <Boolean > ARROW_STREAMS_SETTING = Setting .boolSetting (ARROW_STREAMS , false , Property .NodeScope );
122126
You can’t perform that action at this time.
0 commit comments