File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
server/src/main/java/org/elasticsearch
action/admin/cluster/snapshots/get Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,7 @@ static TransportVersion def(int id) {
206206 public static final TransportVersion ESQL_SERIALIZE_SOURCE_FUNCTIONS_WARNINGS = def (9_016_0_00 );
207207 public static final TransportVersion ESQL_DRIVER_NODE_DESCRIPTION = def (9_017_0_00 );
208208 public static final TransportVersion MULTI_PROJECT = def (9_018_0_00 );
209+ public static final TransportVersion STATE_PARAM_GET_SNAPSHOT = def (9_019_0_00 );
209210
210211 /*
211212 * STOP! READ THIS FIRST! No, really,
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ public class GetSnapshotsRequest extends MasterNodeRequest<GetSnapshotsRequest>
4040 public static final boolean DEFAULT_VERBOSE_MODE = true ;
4141
4242 private static final TransportVersion INDICES_FLAG_VERSION = TransportVersions .V_8_3_0 ;
43+ private static final TransportVersion STATE_FLAG_VERSION = TransportVersions .STATE_PARAM_GET_SNAPSHOT ;
4344
4445 public static final int NO_LIMIT = -1 ;
4546
@@ -121,7 +122,9 @@ public GetSnapshotsRequest(StreamInput in) throws IOException {
121122 if (in .getTransportVersion ().onOrAfter (INDICES_FLAG_VERSION )) {
122123 includeIndexNames = in .readBoolean ();
123124 }
124- state = in .readOptionalString ();
125+ if (in .getTransportVersion ().onOrAfter (STATE_FLAG_VERSION )) {
126+ state = in .readOptionalString ();
127+ }
125128 }
126129
127130 @ Override
@@ -141,7 +144,9 @@ public void writeTo(StreamOutput out) throws IOException {
141144 if (out .getTransportVersion ().onOrAfter (INDICES_FLAG_VERSION )) {
142145 out .writeBoolean (includeIndexNames );
143146 }
144- out .writeOptionalString (state );
147+ if (out .getTransportVersion ().onOrAfter (STATE_FLAG_VERSION )) {
148+ out .writeOptionalString (state );
149+ }
145150 }
146151
147152 @ Override
You can’t perform that action at this time.
0 commit comments