File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
server/src/main/java/org/elasticsearch
action/admin/cluster/storedscripts Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ static TransportVersion def(int id) {
157157 public static final TransportVersion BYTE_SIZE_VALUE_ALWAYS_USES_BYTES_90 = def (9_000_0_06 );
158158 public static final TransportVersion RETRY_ILM_ASYNC_ACTION_REQUIRE_ERROR_90 = def (9_000_0_07 );
159159 public static final TransportVersion RE_REMOVE_MIN_COMPATIBLE_SHARD_NODE_90 = def (9_000_0_08 );
160+ public static final TransportVersion STORED_SCRIPT_CONTENT_LENGTH_90 = def (9_000_0_09 );
160161 public static final TransportVersion COHERE_BIT_EMBEDDING_TYPE_SUPPORT_ADDED = def (9_001_0_00 );
161162 public static final TransportVersion REMOVE_SNAPSHOT_FAILURES = def (9_002_0_00 );
162163 public static final TransportVersion TRANSPORT_STATS_HANDLING_TIME_REQUIRED = def (9_003_0_00 );
Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ public class PutStoredScriptRequest extends AcknowledgedRequest<PutStoredScriptR
4545 public PutStoredScriptRequest (StreamInput in ) throws IOException {
4646 super (in );
4747 id = in .readOptionalString ();
48- if (in .getTransportVersion ().onOrAfter (TransportVersions .STORED_SCRIPT_CONTENT_LENGTH )) {
48+ if (in .getTransportVersion ().isPatchFrom (TransportVersions .STORED_SCRIPT_CONTENT_LENGTH_90 )
49+ || in .getTransportVersion ().onOrAfter (TransportVersions .STORED_SCRIPT_CONTENT_LENGTH )) {
4950 contentLength = in .readVInt ();
5051 } else {
5152 BytesReference content = in .readBytesReference ();
@@ -105,7 +106,8 @@ public StoredScriptSource source() {
105106 public void writeTo (StreamOutput out ) throws IOException {
106107 super .writeTo (out );
107108 out .writeOptionalString (id );
108- if (out .getTransportVersion ().onOrAfter (TransportVersions .STORED_SCRIPT_CONTENT_LENGTH )) {
109+ if (out .getTransportVersion ().isPatchFrom (TransportVersions .STORED_SCRIPT_CONTENT_LENGTH_90 )
110+ || out .getTransportVersion ().onOrAfter (TransportVersions .STORED_SCRIPT_CONTENT_LENGTH )) {
109111 out .writeVInt (contentLength );
110112 } else {
111113 // generate a bytes reference of the correct size (the content isn't actually used in 8.18)
You can’t perform that action at this time.
0 commit comments