Skip to content

Commit

Permalink
Add max_shard_size parameter for Shrink API (fix supported version af…
Browse files Browse the repository at this point in the history
…ter backport) (#5503)

Signed-off-by: Andriy Redko <[email protected]>

Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta authored and ryanbogan committed Dec 13, 2022
1 parent a6e9ed3 commit 0d526f0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public ResizeRequest(StreamInput in) throws IOException {
sourceIndex = in.readString();
type = in.readEnum(ResizeType.class);
copySettings = in.readOptionalBoolean();
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_5_0)) {
maxShardSize = in.readOptionalWriteable(ByteSizeValue::new);
}
}
Expand Down Expand Up @@ -140,7 +140,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeString(sourceIndex);
out.writeEnum(type);
out.writeOptionalBoolean(copySettings);
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_5_0)) {
out.writeOptionalWriteable(maxShardSize);
}
}
Expand Down

0 comments on commit 0d526f0

Please sign in to comment.