Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgrade version to 2.18.0 for ser/de of new ClusterStatsRequest met… #16441

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public class ClusterStatsIT extends AbstractRollingTestCase {
public void testClusterStats() throws IOException {
Response response = client().performRequest(new Request("GET", "/_cluster/stats"));
validateClusterStatsWithFilterResponse(response, nodeStatsMetrics, indicesStatsMetrics);
if (AbstractRollingTestCase.UPGRADE_FROM_VERSION.onOrAfter(Version.V_3_0_0) || (
CLUSTER_TYPE == ClusterType.UPGRADED && Version.CURRENT.onOrAfter(Version.V_3_0_0))) {
if (AbstractRollingTestCase.UPGRADE_FROM_VERSION.onOrAfter(Version.V_2_18_0) || (
CLUSTER_TYPE == ClusterType.UPGRADED && Version.CURRENT.onOrAfter(Version.V_2_18_0))) {
response = client().performRequest(new Request("GET", "/_cluster/stats/os/nodes/_all"));
validateClusterStatsWithFilterResponse(response, List.of("os"), Collections.emptyList());
response = client().performRequest(new Request("GET", "/_cluster/stats/indices/mappings/nodes/_all"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public ClusterStatsRequest(StreamInput in) throws IOException {
if (in.getVersion().onOrAfter(Version.V_2_16_0)) {
useAggregatedNodeLevelResponses = in.readOptionalBoolean();
}
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_18_0)) {
computeAllMetrics = in.readOptionalBoolean();
final long longMetricsFlags = in.readLong();
for (Metric metric : Metric.values()) {
Expand Down Expand Up @@ -135,7 +135,7 @@ public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_2_16_0)) {
out.writeOptionalBoolean(useAggregatedNodeLevelResponses);
}
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_18_0)) {
out.writeOptionalBoolean(computeAllMetrics);
long longMetricFlags = 0;
for (Metric metric : requestedMetrics) {
Expand All @@ -154,7 +154,7 @@ public void writeTo(StreamOutput out) throws IOException {
* An enumeration of the "core" sections of metrics that may be requested
* from the cluster stats endpoint.
*/
@PublicApi(since = "3.0.0")
@PublicApi(since = "2.18.0")
public enum Metric {
OS("os", 0),
JVM("jvm", 1),
Expand Down Expand Up @@ -192,7 +192,7 @@ public int getIndex() {
*
* When no value is provided for param index_metric, default filter is set to _all.
*/
@PublicApi(since = "3.0.0")
@PublicApi(since = "2.18.0")
public enum IndexMetric {
// Metrics computed from ShardStats
SHARDS("shards", 0),
Expand Down
Loading