Remove BWC layer for number of reduce phases (#23303)
Both PRs below have been backported to 5.4 such that we can enable BWC tests of this feature as well as remove version dependend serialization for search request / responses. Relates to #23288 Relates to #23253
This commit is contained in:
parent
09734e7469
commit
5c1924ad19
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.action.search;
|
package org.elasticsearch.action.search;
|
||||||
|
|
||||||
import org.elasticsearch.Version;
|
|
||||||
import org.elasticsearch.action.ActionRequest;
|
import org.elasticsearch.action.ActionRequest;
|
||||||
import org.elasticsearch.action.ActionRequestValidationException;
|
import org.elasticsearch.action.ActionRequestValidationException;
|
||||||
import org.elasticsearch.action.IndicesRequest;
|
import org.elasticsearch.action.IndicesRequest;
|
||||||
|
@ -342,9 +341,7 @@ public final class SearchRequest extends ActionRequest implements IndicesRequest
|
||||||
types = in.readStringArray();
|
types = in.readStringArray();
|
||||||
indicesOptions = IndicesOptions.readIndicesOptions(in);
|
indicesOptions = IndicesOptions.readIndicesOptions(in);
|
||||||
requestCache = in.readOptionalBoolean();
|
requestCache = in.readOptionalBoolean();
|
||||||
if (in.getVersion().onOrAfter(Version.V_6_0_0_alpha1_UNRELEASED)) {
|
batchedReduceSize = in.readVInt();
|
||||||
batchedReduceSize = in.readVInt();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -362,9 +359,7 @@ public final class SearchRequest extends ActionRequest implements IndicesRequest
|
||||||
out.writeStringArray(types);
|
out.writeStringArray(types);
|
||||||
indicesOptions.writeIndicesOptions(out);
|
indicesOptions.writeIndicesOptions(out);
|
||||||
out.writeOptionalBoolean(requestCache);
|
out.writeOptionalBoolean(requestCache);
|
||||||
if (out.getVersion().onOrAfter(Version.V_6_0_0_alpha1_UNRELEASED)) {
|
out.writeVInt(batchedReduceSize);
|
||||||
out.writeVInt(batchedReduceSize);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
package org.elasticsearch.search.internal;
|
package org.elasticsearch.search.internal;
|
||||||
|
|
||||||
import org.elasticsearch.Version;
|
|
||||||
import org.elasticsearch.common.io.stream.StreamInput;
|
import org.elasticsearch.common.io.stream.StreamInput;
|
||||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||||
import org.elasticsearch.common.io.stream.Streamable;
|
import org.elasticsearch.common.io.stream.Streamable;
|
||||||
|
@ -144,11 +143,7 @@ public class InternalSearchResponse implements Streamable, ToXContent {
|
||||||
timedOut = in.readBoolean();
|
timedOut = in.readBoolean();
|
||||||
terminatedEarly = in.readOptionalBoolean();
|
terminatedEarly = in.readOptionalBoolean();
|
||||||
profileResults = in.readOptionalWriteable(SearchProfileShardResults::new);
|
profileResults = in.readOptionalWriteable(SearchProfileShardResults::new);
|
||||||
if (in.getVersion().onOrAfter(Version.V_6_0_0_alpha1_UNRELEASED)) {
|
numReducePhases = in.readVInt();
|
||||||
numReducePhases = in.readVInt();
|
|
||||||
} else {
|
|
||||||
numReducePhases = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -169,8 +164,6 @@ public class InternalSearchResponse implements Streamable, ToXContent {
|
||||||
out.writeBoolean(timedOut);
|
out.writeBoolean(timedOut);
|
||||||
out.writeOptionalBoolean(terminatedEarly);
|
out.writeOptionalBoolean(terminatedEarly);
|
||||||
out.writeOptionalWriteable(profileResults);
|
out.writeOptionalWriteable(profileResults);
|
||||||
if (out.getVersion().onOrAfter(Version.V_6_0_0_alpha1_UNRELEASED)) {
|
out.writeVInt(numReducePhases);
|
||||||
out.writeVInt(numReducePhases);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,8 @@ setup:
|
||||||
---
|
---
|
||||||
"batched_reduce_size lower limit":
|
"batched_reduce_size lower limit":
|
||||||
- skip:
|
- skip:
|
||||||
version: " - 5.99.99"
|
version: " - 5.3.99"
|
||||||
reason: this was added in 6.0.0
|
reason: this was added in 5.4.0
|
||||||
- do:
|
- do:
|
||||||
catch: /batchedReduceSize must be >= 2/
|
catch: /batchedReduceSize must be >= 2/
|
||||||
search:
|
search:
|
||||||
|
@ -27,8 +27,8 @@ setup:
|
||||||
---
|
---
|
||||||
"batched_reduce_size 2 with 5 shards":
|
"batched_reduce_size 2 with 5 shards":
|
||||||
- skip:
|
- skip:
|
||||||
version: " - 5.99.99"
|
version: " - 5.3.99"
|
||||||
reason: this was added in 6.0.0
|
reason: this was added in 5.4.0
|
||||||
- do:
|
- do:
|
||||||
index:
|
index:
|
||||||
index: test_1
|
index: test_1
|
||||||
|
|
Loading…
Reference in New Issue