Update PutFollowAction serialization post-backport (#37989)

This commit modifies the `PutFollowRequest` to reflect the fact that
active shard functionality has been backported to 6.7.
This commit is contained in:
Tim Brooks 2019-01-31 09:31:22 -07:00 committed by GitHub
parent 9923f0fe6a
commit b8575c6aa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -202,8 +202,7 @@ public final class PutFollowAction extends Action<PutFollowAction.Response> {
super(in); super(in);
remoteCluster = in.readString(); remoteCluster = in.readString();
leaderIndex = in.readString(); leaderIndex = in.readString();
// TODO: Update after backport if (in.getVersion().onOrAfter(Version.V_6_7_0)) {
if (in.getVersion().onOrAfter(Version.V_7_0_0)) {
waitForActiveShards(ActiveShardCount.readFrom(in)); waitForActiveShards(ActiveShardCount.readFrom(in));
} }
followRequest = new ResumeFollowAction.Request(in); followRequest = new ResumeFollowAction.Request(in);
@ -214,8 +213,7 @@ public final class PutFollowAction extends Action<PutFollowAction.Response> {
super.writeTo(out); super.writeTo(out);
out.writeString(remoteCluster); out.writeString(remoteCluster);
out.writeString(leaderIndex); out.writeString(leaderIndex);
// TODO: Update after backport if (out.getVersion().onOrAfter(Version.V_6_7_0)) {
if (out.getVersion().onOrAfter(Version.V_7_0_0)) {
waitForActiveShards.writeTo(out); waitForActiveShards.writeTo(out);
} }
followRequest.writeTo(out); followRequest.writeTo(out);