From 19aacfc1ded3f4e96a45d32041aea722b4af2925 Mon Sep 17 00:00:00 2001 From: Pete Gillin Date: Thu, 31 Oct 2024 17:29:38 +0000 Subject: [PATCH] Tidy up `ClusterStatsNodeRequest` There was an `@UpdateForV9` on this class saying that it could be replaced with `TransportRequest.Empty`. But that was removed by https://github.com/elastic/elasticsearch/pull/109790, and all its non-test usages replaced by trivial implementations of `TransportRequest`. This change therefore just simplifies the class a bit and removes that annotation. --- .../admin/cluster/stats/TransportClusterStatsAction.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java index b132a1177d98a..36b018b5002eb 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java @@ -35,11 +35,9 @@ import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.CancellableSingleObjectCache; import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.core.UpdateForV9; import org.elasticsearch.index.IndexService; import org.elasticsearch.index.engine.CommitStats; import org.elasticsearch.index.seqno.RetentionLeaseStats; @@ -307,7 +305,6 @@ protected ClusterStatsNodeResponse nodeOperation(ClusterStatsNodeRequest nodeReq ); } - @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) // this can be replaced with TransportRequest.Empty in v9 public static class ClusterStatsNodeRequest extends TransportRequest { ClusterStatsNodeRequest() {} @@ -320,11 +317,6 @@ public ClusterStatsNodeRequest(StreamInput in) throws IOException { public Task createTask(long id, String type, String action, TaskId parentTaskId, Map headers) { return new CancellableTask(id, type, action, "", parentTaskId, headers); } - - @Override - public void writeTo(StreamOutput out) throws IOException { - super.writeTo(out); - } } private static class MetadataStatsCache extends CancellableSingleObjectCache {