diff --git a/muted-tests.yml b/muted-tests.yml index 1952e34c0897d..7ab855ac5c293 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -382,9 +382,6 @@ tests: - class: org.elasticsearch.xpack.esql.action.CrossClustersCancellationIT method: testCancelSkipUnavailable issue: https://github.com/elastic/elasticsearch/issues/121631 -- class: org.elasticsearch.upgrades.UpgradeClusterClientYamlTestSuiteIT - method: test {p0=mixed_cluster/110_enrich/Enrich stats query smoke test for mixed cluster} - issue: https://github.com/elastic/elasticsearch/issues/121642 - class: org.elasticsearch.search.CrossClusterSearchUnavailableClusterIT method: testSearchSkipUnavailable issue: https://github.com/elastic/elasticsearch/issues/121497 diff --git a/server/src/main/java/org/elasticsearch/action/support/local/LocalClusterStateRequest.java b/server/src/main/java/org/elasticsearch/action/support/local/LocalClusterStateRequest.java index ec7c72c0ab428..2a42a3a8f7597 100644 --- a/server/src/main/java/org/elasticsearch/action/support/local/LocalClusterStateRequest.java +++ b/server/src/main/java/org/elasticsearch/action/support/local/LocalClusterStateRequest.java @@ -41,12 +41,23 @@ protected LocalClusterStateRequest(TimeValue masterTimeout) { */ @UpdateForV10(owner = UpdateForV10.Owner.DISTRIBUTED_COORDINATION) protected LocalClusterStateRequest(StreamInput in) throws IOException { + this(in, true); + } + + /** + * This constructor exists solely for BwC purposes. It should exclusively be used by requests that used to extend + * {@link org.elasticsearch.action.support.master.MasterNodeRequest} and still need to be able to serialize incoming request. + */ + @UpdateForV10(owner = UpdateForV10.Owner.DISTRIBUTED_COORDINATION) + protected LocalClusterStateRequest(StreamInput in, boolean readLocal) throws IOException { super(in); masterTimeout = in.readTimeValue(); if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_15_0)) { in.readVLong(); } - in.readBoolean(); + if (readLocal) { + in.readBoolean(); + } } @Override diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/EnrichStatsAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/EnrichStatsAction.java index 4de62d0fd4992..79644852eca32 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/EnrichStatsAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/EnrichStatsAction.java @@ -46,12 +46,13 @@ public Request(TimeValue masterNodeTimeout) { } /** - * NB prior to 9.0 this was a TransportMasterNodeReadAction so for BwC we must remain able to read these requests until + * NB prior to 9.0 this was a TransportMasterNodeAction so for BwC we must remain able to read these requests until * we no longer need to support calling this action remotely. */ @UpdateForV10(owner = UpdateForV10.Owner.DATA_MANAGEMENT) public Request(StreamInput in) throws IOException { - super(in); + // This request extended MasterNodeRequest instead of MasterNodeReadRequest, meaning that it didn't serialize the `local` field. + super(in, false); } @Override @@ -90,7 +91,7 @@ public List getCacheStats() { } /** - * NB prior to 9.0 this was a TransportMasterNodeReadAction so for BwC we must remain able to write these responses until + * NB prior to 9.0 this was a TransportMasterNodeAction so for BwC we must remain able to write these responses until * we no longer need to support calling this action remotely. */ @UpdateForV10(owner = UpdateForV10.Owner.DATA_MANAGEMENT) @@ -181,7 +182,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws public record ExecutingPolicy(String name, TaskInfo taskInfo) implements Writeable, ToXContentFragment { /** - * NB prior to 9.0 this was a TransportMasterNodeReadAction so for BwC we must remain able to write these responses until + * NB prior to 9.0 this was a TransportMasterNodeAction so for BwC we must remain able to write these responses until * we no longer need to support calling this action remotely. */ @UpdateForV10(owner = UpdateForV10.Owner.DATA_MANAGEMENT) diff --git a/x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/action/TransportEnrichStatsAction.java b/x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/action/TransportEnrichStatsAction.java index 380b64ea365fb..c42bdcdfcea7c 100644 --- a/x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/action/TransportEnrichStatsAction.java +++ b/x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/action/TransportEnrichStatsAction.java @@ -37,7 +37,7 @@ public class TransportEnrichStatsAction extends TransportLocalClusterStateAction private final Client client; /** - * NB prior to 9.0 this was a TransportMasterNodeReadAction so for BwC it must be registered with the TransportService until + * NB prior to 9.0 this was a TransportMasterNodeAction so for BwC it must be registered with the TransportService until * we no longer need to support calling this action remotely. */ @UpdateForV10(owner = UpdateForV10.Owner.DATA_MANAGEMENT)