File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 55 */
66package org .elasticsearch .xpack .core .ccr .action ;
77
8+ import org .elasticsearch .Version ;
89import org .elasticsearch .action .ActionRequestValidationException ;
910import org .elasticsearch .action .ActionType ;
1011import org .elasticsearch .action .support .master .AcknowledgedRequest ;
@@ -159,7 +160,9 @@ public Request(StreamInput in) throws IOException {
159160 remoteCluster = in .readString ();
160161 leaderIndexPatterns = in .readStringList ();
161162 followIndexNamePattern = in .readOptionalString ();
162- settings = Settings .readSettingsFromStream (in );
163+ if (in .getVersion ().onOrAfter (Version .V_7_9_0 )) {
164+ settings = Settings .readSettingsFromStream (in );
165+ }
163166 parameters = new FollowParameters (in );
164167 }
165168
@@ -170,7 +173,9 @@ public void writeTo(StreamOutput out) throws IOException {
170173 out .writeString (remoteCluster );
171174 out .writeStringCollection (leaderIndexPatterns );
172175 out .writeOptionalString (followIndexNamePattern );
173- Settings .writeSettingsToStream (settings , out );
176+ if (out .getVersion ().onOrAfter (Version .V_7_9_0 )) {
177+ Settings .writeSettingsToStream (settings , out );
178+ }
174179 parameters .writeTo (out );
175180 }
176181
Original file line number Diff line number Diff line change 66
77package org .elasticsearch .xpack .core .ccr .action ;
88
9+ import org .elasticsearch .Version ;
910import org .elasticsearch .action .ActionRequestValidationException ;
1011import org .elasticsearch .action .ActionResponse ;
1112import org .elasticsearch .action .ActionType ;
@@ -173,7 +174,9 @@ public Request(StreamInput in) throws IOException {
173174 this .remoteCluster = in .readString ();
174175 this .leaderIndex = in .readString ();
175176 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+ }
177180 this .parameters = new FollowParameters (in );
178181 waitForActiveShards (ActiveShardCount .readFrom (in ));
179182 }
@@ -184,7 +187,9 @@ public void writeTo(StreamOutput out) throws IOException {
184187 out .writeString (remoteCluster );
185188 out .writeString (leaderIndex );
186189 out .writeString (followerIndex );
187- Settings .writeSettingsToStream (settings , out );
190+ if (out .getVersion ().onOrAfter (Version .V_7_9_0 )) {
191+ Settings .writeSettingsToStream (settings , out );
192+ }
188193 parameters .writeTo (out );
189194 waitForActiveShards .writeTo (out );
190195 }
You can’t perform that action at this time.
0 commit comments