File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
server/src/main/java/org/elasticsearch Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ static TransportVersion def(int id) {
195195 public static final TransportVersion REMOVE_ALL_APPLICABLE_SELECTOR = def (9_009_0_00 );
196196 public static final TransportVersion SLM_UNHEALTHY_IF_NO_SNAPSHOT_WITHIN = def (9_010_0_00 );
197197 public static final TransportVersion ESQL_SUPPORT_PARTIAL_RESULTS = def (9_011_0_00 );
198+ public static final TransportVersion REMOVE_REPOSITORY_CONFLICT_MESSAGE = def (9_012_0_00 );
198199
199200 /*
200201 * STOP! READ THIS FIRST! No, really,
Original file line number Diff line number Diff line change 99
1010package org .elasticsearch .repositories ;
1111
12+ import org .elasticsearch .TransportVersions ;
1213import org .elasticsearch .common .io .stream .StreamInput ;
1314import org .elasticsearch .common .io .stream .StreamOutput ;
14- import org .elasticsearch .core .UpdateForV9 ;
1515import org .elasticsearch .rest .RestStatus ;
1616
1717import java .io .IOException ;
@@ -29,16 +29,20 @@ public RestStatus status() {
2929 return RestStatus .CONFLICT ;
3030 }
3131
32- @ UpdateForV9 (owner = UpdateForV9 .Owner .DISTRIBUTED_COORDINATION ) // drop unneeded string from wire format
3332 public RepositoryConflictException (StreamInput in ) throws IOException {
3433 super (in );
35- in .readString ();
34+ if (in .getTransportVersion ().before (TransportVersions .REMOVE_REPOSITORY_CONFLICT_MESSAGE )) {
35+ // Deprecated `backwardCompatibleMessage` field
36+ in .readString ();
37+ }
3638 }
3739
3840 @ Override
39- @ UpdateForV9 (owner = UpdateForV9 .Owner .DISTRIBUTED_COORDINATION ) // drop unneeded string from wire format
4041 protected void writeTo (StreamOutput out , Writer <Throwable > nestedExceptionsWriter ) throws IOException {
4142 super .writeTo (out , nestedExceptionsWriter );
42- out .writeString ("" );
43+ if (out .getTransportVersion ().before (TransportVersions .REMOVE_REPOSITORY_CONFLICT_MESSAGE )) {
44+ // Deprecated `backwardCompatibleMessage` field
45+ out .writeString ("" );
46+ }
4347 }
4448}
You can’t perform that action at this time.
0 commit comments