@@ -69,7 +69,7 @@ public TransportStats(StreamInput in) throws IOException {
6969 rxSize = in .readVLong ();
7070 txCount = in .readVLong ();
7171 txSize = in .readVLong ();
72- if (in .getTransportVersion (). onOrAfter ( TransportVersions . V_8_1_0 ) && in . readBoolean ()) {
72+ if (in .readBoolean ()) {
7373 inboundHandlingTimeBucketFrequencies = new long [HandlingTimeTracker .BUCKET_COUNT ];
7474 for (int i = 0 ; i < inboundHandlingTimeBucketFrequencies .length ; i ++) {
7575 inboundHandlingTimeBucketFrequencies [i ] = in .readVLong ();
@@ -98,15 +98,13 @@ public void writeTo(StreamOutput out) throws IOException {
9898 out .writeVLong (rxSize );
9999 out .writeVLong (txCount );
100100 out .writeVLong (txSize );
101- if (out .getTransportVersion ().onOrAfter (TransportVersions .V_8_1_0 )) {
102- assert (inboundHandlingTimeBucketFrequencies .length > 0 ) == (outboundHandlingTimeBucketFrequencies .length > 0 );
103- out .writeBoolean (inboundHandlingTimeBucketFrequencies .length > 0 );
104- for (long handlingTimeBucketFrequency : inboundHandlingTimeBucketFrequencies ) {
105- out .writeVLong (handlingTimeBucketFrequency );
106- }
107- for (long handlingTimeBucketFrequency : outboundHandlingTimeBucketFrequencies ) {
108- out .writeVLong (handlingTimeBucketFrequency );
109- }
101+ assert (inboundHandlingTimeBucketFrequencies .length > 0 ) == (outboundHandlingTimeBucketFrequencies .length > 0 );
102+ out .writeBoolean (inboundHandlingTimeBucketFrequencies .length > 0 );
103+ for (long handlingTimeBucketFrequency : inboundHandlingTimeBucketFrequencies ) {
104+ out .writeVLong (handlingTimeBucketFrequency );
105+ }
106+ for (long handlingTimeBucketFrequency : outboundHandlingTimeBucketFrequencies ) {
107+ out .writeVLong (handlingTimeBucketFrequency );
110108 }
111109 if (out .getTransportVersion ().onOrAfter (TransportVersions .V_8_8_0 )) {
112110 out .writeMap (transportActionStats , StreamOutput ::writeWriteable );
0 commit comments