Skip to content

Commit

Permalink
Fix backcompat issue for #9638 (caused by bad cherry pick).
Browse files Browse the repository at this point in the history
  • Loading branch information
rjernst committed Feb 12, 2015
1 parent 4ab5719 commit 5fed9aa
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -148,6 +148,9 @@ public OptimizeRequest upgrade(boolean upgrade) {

public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
if (in.getVersion().before(Version.V_1_5_0)) {
in.readBoolean(); // backcompat for waitForMerges, no longer exists
}
maxNumSegments = in.readInt();
onlyExpungeDeletes = in.readBoolean();
flush = in.readBoolean();
Expand All @@ -158,6 +161,9 @@ public void readFrom(StreamInput in) throws IOException {

public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
if (out.getVersion().before(Version.V_1_5_0)) {
out.writeBoolean(true); // previously waitForMerges
}
out.writeInt(maxNumSegments);
out.writeBoolean(onlyExpungeDeletes);
out.writeBoolean(flush);
Expand Down

0 comments on commit 5fed9aa

Please sign in to comment.