File tree 2 files changed +14
-4
lines changed
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action
2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
package org .elasticsearch .xpack .core .ccr .action ;
7
7
8
+ import org .elasticsearch .Version ;
8
9
import org .elasticsearch .action .ActionRequestValidationException ;
9
10
import org .elasticsearch .action .ActionType ;
10
11
import org .elasticsearch .action .support .master .AcknowledgedRequest ;
@@ -159,7 +160,9 @@ public Request(StreamInput in) throws IOException {
159
160
remoteCluster = in .readString ();
160
161
leaderIndexPatterns = in .readStringList ();
161
162
followIndexNamePattern = in .readOptionalString ();
162
- settings = Settings .readSettingsFromStream (in );
163
+ if (in .getVersion ().onOrAfter (Version .V_7_9_0 )) {
164
+ settings = Settings .readSettingsFromStream (in );
165
+ }
163
166
parameters = new FollowParameters (in );
164
167
}
165
168
@@ -170,7 +173,9 @@ public void writeTo(StreamOutput out) throws IOException {
170
173
out .writeString (remoteCluster );
171
174
out .writeStringCollection (leaderIndexPatterns );
172
175
out .writeOptionalString (followIndexNamePattern );
173
- Settings .writeSettingsToStream (settings , out );
176
+ if (out .getVersion ().onOrAfter (Version .V_7_9_0 )) {
177
+ Settings .writeSettingsToStream (settings , out );
178
+ }
174
179
parameters .writeTo (out );
175
180
}
176
181
Original file line number Diff line number Diff line change 6
6
7
7
package org .elasticsearch .xpack .core .ccr .action ;
8
8
9
+ import org .elasticsearch .Version ;
9
10
import org .elasticsearch .action .ActionRequestValidationException ;
10
11
import org .elasticsearch .action .ActionResponse ;
11
12
import org .elasticsearch .action .ActionType ;
@@ -173,7 +174,9 @@ public Request(StreamInput in) throws IOException {
173
174
this .remoteCluster = in .readString ();
174
175
this .leaderIndex = in .readString ();
175
176
this .followerIndex = in .readString ();
176
- this .settings = Settings .readSettingsFromStream (in );
177
+ if (in .getVersion ().onOrAfter (Version .V_7_9_0 )) {
178
+ this .settings = Settings .readSettingsFromStream (in );
179
+ }
177
180
this .parameters = new FollowParameters (in );
178
181
waitForActiveShards (ActiveShardCount .readFrom (in ));
179
182
}
@@ -184,7 +187,9 @@ public void writeTo(StreamOutput out) throws IOException {
184
187
out .writeString (remoteCluster );
185
188
out .writeString (leaderIndex );
186
189
out .writeString (followerIndex );
187
- Settings .writeSettingsToStream (settings , out );
190
+ if (out .getVersion ().onOrAfter (Version .V_7_9_0 )) {
191
+ Settings .writeSettingsToStream (settings , out );
192
+ }
188
193
parameters .writeTo (out );
189
194
waitForActiveShards .writeTo (out );
190
195
}
You can’t perform that action at this time.
0 commit comments